Cross-region Query
Last Updated:2021-09-13
Interface Description
Before sending the cross-origin request, the browser sends a preflight request (OPTIONS) and carries the specific source domain, HTTP method, and header information for BOS to decide whether a real request is sent. This interface responds to such requests.
Request URI
OPTIONS /v1/{bucketName}/{object}
Request Body Parameters
None
Response Header Parameters
Parameter Name | Parameter Type | Description | Example Value |
---|---|---|---|
Access-Control-Allow-Credentials | String | Whether the BOS server allows the client to contain the cookie in the request. It takes effect only when it is allowed by both client and server. BOS returns “Allow” when the request is passed. That is, the value is true, which is case sensitive. | |
Access-Control-Allow-Headers | String | List of headers allowed in the request. If any header in the request is not allowed, the CORS rule matching fails, and it returns a header that does not start with Access-Control-. Multiple headers are separated by commas. Note: It returns the list of headers for this request only regardless of whether more headers allowed are configured in the configuration file. | |
Access-Control-Allow-Methods | String | HTTP method to allow the request. If this request is not allowed, it does not contain this header and all Access-Control-* related headers. Type: String. Note: It returns a list of all allowedMethods, which not just contains the method for this request. | |
Access-Control-Allow-Origin | String | Origin contained in the request. If it is not allowed, it does not contain this header and all Access-Control-* related headers. Type: String. | |
Access-Control-Expose-Headers | String | List of headers allowed to access the JavaScript program on the request side. It corresponds to the exposeHeaders in the configuration file. Type: String. | |
Access-Control-Max-Age | String | Time for the browser to cache the preflight results (seconds) Type: integer. |
Response Body Parameters
None
Request Example
None
Response Example
None
Error Code
Refer to the universal error code.