GET Bucket cors¶
バケットのCross-Origin Resource Sharing(CORS)設定情報を返します。
リクエスト情報¶
シンタックス¶
GET /?cors HTTP/1.1
Host: {bucket name}.storage-dag.iijgio.com
Date: {date}
Authorization: {authorization string}
リクエストパラメータ¶
この操作ではリクエストパラメータは使用しません。
リクエストヘッダー¶
この操作では基本リクエストヘッダーのみ使用します。
リクエストエレメント¶
この操作ではリクエストエレメントは使用しません。
レスポンス情報¶
レスポンスヘッダー¶
この操作では基本レスポンスヘッダーのみ返します。
レスポンスエレメント¶
この操作では以下のレスポンスエレメントを返します。
名前 | 説明 | ||||
---|---|---|---|---|---|
CORSConfiguration |
|
||||
CORSRule |
|
||||
ID |
|
||||
AllowedHeader |
|
||||
AllowedMethod |
|
||||
AllowedOrigin |
|
||||
ExposeHeader |
|
||||
MaxAgeSeconds |
|
サンプル¶
- バケットのCORS設定を取得するサンプル
- リクエスト
GET /?cors HTTP/1.1 Host: mybucket.storage-dag.iijgio.com Date: Wed, 1 Oct 2014 00:00:00 GMT Authorization: IIJGIO 15B4D3461F177624206A:xQE0diMbLRepdf3YB+FIEXAMPLE=
- レスポンス
HTTP/1.1 200 OK x-iijgio-id-2: eftixk72aD6Ap51TnqcoF8eFidJG9Z/2mkiDFu8yU9AS1ed4OpIszj7UDNEHGran x-iijgio-request-id: 318BC8BC148832E5 Date: Wed, 1 Oct 2014 00:00:00 GMT Server: storage-dag.iijgio.com Content-Length: 215 <CORSConfiguration> <CORSRule> <AllowedOrigin>http://www.example.com</AllowedOrigin> <AllowedMethod>GET</AllowedMethod> <MaxAgeSeconds>3000</MaxAgeSec> </CORSRule> </CORSConfiguration>
PUT Bucket cors¶
バケットのCORS設定を登録します。もし既に設定されている場合は、指定したCORS設定に置き換えます。
リクエスト情報¶
シンタックス¶
PUT /?cors HTTP/1.1
Host: {bucket name}.storage-dag.iijgio.com
Content-Length: {length}
Date: {date}
Authorization: {authorization string}
Content-MD5: {MD5}
<CORSConfiguration>
<CORSRule>
<AllowedOrigin>{Origin you want to allow cross-domain requests from}</AllowedOrigin>
<AllowedOrigin>...</AllowedOrigin>
...
<AllowedMethod>{HTTP method}</AllowedMethod>
<AllowedMethod>...</AllowedMethod>
...
<MaxAgeSeconds>{Time in seconds your browser to cache the pre-flight OPTIONS response for a resource}</MaxAgeSeconds>
<AllowedHeader>{Headers that you want the browser to be allowed to send}</AllowedHeader>
<AllowedHeader>...</AllowedHeader>
...
<ExposeHeader>{Headers in the response that you want accessible from client application}</ExposeHeader>
<ExposeHeader>...</ExposeHeader>
...
</CORSRule>
<CORSRule>
...
</CORSRule>
...
</CORSConfiguration>
リクエストパラメータ¶
この操作ではリクエストパラメータは使用しません。
リクエストヘッダー¶
この操作では基本リクエストヘッダーに加え、以下のヘッダーを使用します。
HTTPヘッダー | 説明 | 必須 | ||||
---|---|---|---|---|---|---|
Content-MD5 |
|
× |
リクエストエレメント¶
この操作では以下のリクエストエレメントを使用します。
名前 | 説明 | 必須 | ||||
---|---|---|---|---|---|---|
CORSConfiguration |
|
○ | ||||
CORSRule |
|
○ | ||||
ID |
|
× | ||||
AllowedHeader |
|
× | ||||
AllowedMethod |
|
○ | ||||
AllowedOrigin |
|
○ | ||||
ExposeHeader |
|
× | ||||
MaxAgeSeconds |
|
× |
サンプル¶
- バケットのCORS設定を取得するサンプル
- リクエスト
PUT /?cors HTTP/1.1 Host: mybucket.storage-dag.iijgio.com Date: Wed, 1 Oct 2014 00:00:00 GMT Content-MD5: JpqnP/EuKnsLJUEx4yd5NQ== Authorization: IIJGIO 15B4D3461F177624206A:xQE0diMbLRepdf3YB+FIEXAMPLE= Content-Length: 216 <CORSConfiguration> <CORSRule> <AllowedOrigin>http://www.example.com</AllowedOrigin> <AllowedMethod>PUT</AllowedMethod> <AllowedMethod>POST</AllowedMethod> <AllowedMethod>DELETE</AllowedMethod> <AllowedHeader>*</AllowedHeader> <MaxAgeSeconds>3000</MaxAgeSec> </CORSRule> <CORSRule> <AllowedOrigin>*</AllowedOrigin> <AllowedMethod>GET</AllowedMethod> <AllowedHeader>*</AllowedHeader> <MaxAgeSeconds>3000</MaxAgeSeconds> </CORSRule> </CORSConfiguration>
- レスポンス
HTTP/1.1 200 OK x-iijgio-id-2: eftixk72aD6Ap51TnqcoF8eFidJG9Z/2mkiDFu8yU9AS1ed4OpIszj7UDNEHGran x-iijgio-request-id: 318BC8BC148832E5 Date: Wed, 1 Oct 2014 00:00:00 GMT Server: storage-dag.iijgio.com
DELETE Bucket cors¶
バケットの設定されているCORS設定情報を削除します。
リクエスト情報¶
シンタックス¶
DELETE /?cors HTTP/1.1
Host: {bucket name}.storage-dag.iijgio.com
Date: {date}
Authorization: {authorization string}
リクエストパラメータ¶
この操作ではリクエストパラメータを使用しません。
リクエストヘッダー¶
この操作では基本リクエストヘッダーのみ使用します。
リクエストエレメント¶
この操作ではリクエストパラメータは使用しません。
サンプル¶
- バケットのCORS設定を削除するサンプル
- リクエスト
DELETE /?cors HTTP/1.1 Host: mybucket.storage-dag.iijgio.com Date: Wed, 1 Oct 2014 00:00:00 GMT Authorization: IIJGIO 15B4D3461F177624206A:xQE0diMbLRepdf3YB+FIEXAMPLE=
- レスポンス
HTTP/1.1 204 No Content x-iijgio-id-2: eftixk72aD6Ap51TnqcoF8eFidJG9Z/2mkiDFu8yU9AS1ed4OpIszj7UDNEHGran x-iijgio-request-id: 318BC8BC148832E5 Date: Wed, 1 Oct 2014 00:00:00 GMT Server: storage-dag.iijgio.com Content-Length: 0