Volcengine Kubernetes Engine
Field | Type | Required | Description |
Field | Type | Required | Description |
type | String | Yes | The action type of the custom forwarding rule. For cross-origin traffic forwarding, set this field to Cors. |
allowOrigin | Array | Yes | Specifies the URIs allowed to access the target resource. It determines which external sites can successfully make cross-origin requests to the server.
warning If you set the allowCredentials field to on, this field requires exact domain names and does not support the wildcard *. |
allowMethods | Array | Yes | Specifies the HTTP methods allowed by the server for cross-origin requests. This setting declares supported request methods to clients when the browsers initiate preflight requests. Supported methods include common HTTP methods, such as GET, POST, OPTIONS, PUT, PATCH, DELETE, and HEAD. You can configure multiple HTTP methods separated by commas (,). For example, you can enter "GET","POST". |
allowHeaders | Array | No | Specifies the custom HTTP request headers that clients are allowed to include in cross-origin requests.
|
exposeHeaders | Array | No | Specifies the custom HTTP response headers that the browser is allowed to access and read in response to cross-origin requests.
warning If the backend service returns specific business data (such as the total list pagination count and trace IDs) in response headers and the frontend code needs to read and process the headers, use this field to explicitly expose the headers to the browser. |
allowCredentials | String | Yes | Specifies whether credentials, such as cookies, are allowed in cross-origin requests. Valid values:
|
maxAge | Integer | No | Specifies the maximum cache duration for preflight requests (OPTIONS) in the browser. For similar cross-origin requests within this period, the browser can skip the preflight requests and send the actual requests directly. The time (in seconds) is an integer value. For example, the value 3600 means 1 hour. |