Get CORS Headers

This API is used to get CORS headers for website acceleration or file download service.

1. Request Definition

  • API URL
https://cdn-api.swiftfederation.com/v1.0/services/{serviceId}/cors_headers
  • Request Method
GET
  • Request Header

Refer to HTTP Request Headers

  • Request Body

No request body for this API.


2. Response Definition

  • Response Header

Refer to HTTP Response Headers

  • Response Body
Field Type Description
Access-Control-Allow-Origin string Response can be shared with requesting code from the given origin. Please note that null value is not allowed. E.g. "*", "http://example.com".
Access-Control-Expose-Headers string Headers can be exposed as part of the response by listing their names. This header accepts any string value. E.g. "Content-Length".
Access-Control-Max-Age int how long in seconds the results of a preflight request can be cached. The provided value must be either non-negative int or -1.
Access-Control-Allow-Credentials boolean Whether to expose the response to frontend JavaScript code. E.g. "true"
Access-Control-Allow-Methods string methods allowed when accessing the resource in response to a preflight request. It should be either single http method or comma-separated list of http methods: GET, POST, PUT, DELETE, HEAD, OPTIONS, CONNECT and TRACE. E.g. "GET, POST"
Access-Control-Allow-Headers string HTTP headers can be used during the actual request. This header accepts any string value. E.g. "X-Customer-Token"
  • Response Body Example
{
    "Access-Control-Allow-Origin": "*",
    "Access-Control-Max-Age": "600",
    "Access-Control-Allow-Methods": "GET, POST"
}
© 2019 Conversant Solutions Pte Ltd. All rights reserved.            Updated 2019-05-23 03:46:01

results matching ""

    No results matching ""