3.6 library(http/http_cors): Enable CORS: Cross-Origin Resource Sharing
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog HTTP support
        • The HTTP server libraries
          • library(http/http_cors): Enable CORS: Cross-Origin Resource Sharing
            • cors_enable/0
            • cors_enable/2
Availability::- use_module(library(http/http_cors)).
Source[det]cors_enable
Emit the HTTP header Access-Control-Allow-Origin using domains from the setting http:cors. This this setting is [] (default), nothing is written. This predicate is typically used for replying to API HTTP-request (e.g., replies to an AJAX request that typically serve JSON or XML).