OptionsObjectCORS

Prev Next

Available in Classic and VPC

By sending an OPTIONS request with the path to the object along with the origin and request type, you can check whether the object is accessible from the origin with that request type.

Requests

The following describes the request format for the endpoint. The request format is as follows.

Method URI
OPTIONS /{bucket-name}/{object-name}

Request syntax

The request syntax is as follows.

OPTIONS https://{endpoint}/{bucket-name}/{object-name} # path style
OPTIONS https://{bucket-name}.{endpoint}/{object-name} # virtual host style

Request headers

For headers common to all Object Storage APIs, see Object Storage common headers.

Note

If the method is OPTIONS, the Authorization header and x-amz-date header are not required.

Request path parameters

The following describes the parameters.

Field Type Required Description
bucket-name String Required Name of the bucket where the object is stored
object-name String Required Name of the object to check

Request example

The following is a sample request.

OPTIONS /example-bucket/queen-bee HTTP/1.1
Access-Control-Request-Method: PUT
Origin: http://example.com
Host: kr.object.ncloudstorage.com

Responses

The following describes the response format.

Response headers

For response headers common to all Object Storage APIs, see Object Storage common response headers.

Response status codes

For response status codes common to all Object Storage APIs, see Object Storage response status codes.

Response example

The following is a sample response.

HTTP/1.1 200 OK
Date: Wed, 07 Dec 2016 16:23:14 GMT
Accept-Ranges: bytes
x-amz-request-id: 9a2ae3e1-76dd-4eec-a8f2-1a7f60f63483
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: PUT
Access-Control-Allow-Credentials: true
Vary: Origin, Access-Control-Request-Headers, Access-Control-Allow-Methods
Content-Length: 0