Create CORS Headers

This API is used to create CORS headers for website acceleration or file download service.
IMPORTANT: All existing CORS headers for the service will be removed.

1. Request Definition

  • API URL{serviceId}/cors_headers
  • Request Method
  • Request Header

Refer to HTTP Request Headers

  • Request Body

Request Body Data Format: JSON

Field Required Type Description
Access-Control-Allow-Origin Optional string Response can be shared with requesting code from the given origin. Please note that null value is not allowed. E.g. "*", "".
Access-Control-Expose-Headers Optional 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 Optional 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 Optional boolean Whether to expose the response to frontend JavaScript code. E.g. "true"
Access-Control-Allow-Methods Optional 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 Optional string HTTP headers can be used during the actual request. This header accepts any string value. E.g. "X-Customer-Token"
  • Request Body Example
    "Access-Control-Allow-Origin": "*",
    "Access-Control-Max-Age": 600,
    "Access-Control-Allow-Methods": "GET, POST"

2. Response Definition

  • Response Header

Refer to HTTP Response Headers

  • Response Body
No response body for this API.
           Updated 2019-12-19 02:20:06

results matching ""

    No results matching ""