本文へジャンプします。

ニフクラ ユーザーガイド

本ページは2023/9/5をもって、新ページhttps://docs.nifcloud.com/object-storage-service/api/GetBucketCors.htmへ移行しました。 今後は新ページをご参照ください。

GetBucketCors

処理概要

バケットに設定されているCors(Cross-Origin Resource Sharing)構成情報を表示します。

リクエストURL

GET /{Bucket}?cors

指定するパラメーター

ヘッダーパラメーター
パラメーター 説明 必須
x-amz-content-sha256 string ペイロード全体の計算されたSHA256チェックサム
x-amz-date string リクエスト側で生成した現在日時
Authorization string リクエスト認証に用いる文字列
パスパラメーター
パラメーター 説明 必須
Bucket string バケット名

応答フィールド

レスポンスヘッダー
フィールド (項目) 説明
x-amz-date string トランザクションが実行された日時
Content-Type string コンテンツのMIMEタイプ
Content-Length string レスポンスボディのバイト数
Connection string 持続接続の状態を表示します。
x-amz-request-id string

このリクエストに付与されるID
トラブルについて問い合わせる際に利用されます。


x-amz-id-2 string

このリクエストに対する処理ID
トラブルについて問い合わせる際に利用されます。


x-ntap-sg-trace-id string

このリクエストに対する処理ID
トラブルについて問い合わせる際に利用されます。


X-Fcx-Endpoint-Request string APIエンドポイントとしてリクエストを受け付けたことを示す番号
レスポンスボディ
フィールド (項目) 説明
CORSConfiguration structure 最大100個のCORSRules要素用のコンテナ
CORSRule list 許可するクロスオリジンアクセス(最大100個)
AllowedOrigin string クロスサイトリクエストを許可するオリジン
AllowedHeader string クロスサイトリクエストに含めることができるヘッダー
AllowedMethod string[] クロスサイトリクエストで許可するHTTPメソッド
MaxAgeSeconds integer プリフライトリクエストをブラウザでキャッシュできる時間
ExposeHeader string Access-Control-Expose-Headers としてクライアントに示すクロスサイトリクエストで指定可能なヘッダ

リクエストサンプル

    GET /general-bucket?cors HTTP/1.1
User-Agent: curl/7.29.0
Host: jp-east-1.storage.api.nifcloud.com
Accept: */*
x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date:20190604T022522Z
Authorization:AWS4-HMAC-SHA256 Credential=XK8Z3830NBL1BT9WD3HD/20190604/jp-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=add71907bfade4548865bccd2721ce01dae46004f25209104420b56cd84eb44d

  

応答サンプル

    HTTP/1.1 200 OK
Date: Tue, 04 Jun 2019 02:25:23 GMT
Content-Type: application/xml
Content-Length: 557
Connection: keep-alive
x-amz-request-id: 2327732986
x-amz-id-2: 12174498
x-ntap-sg-trace-id: 32b3111a2806ed47
X-Fcx-Endpoint-Request: EXECUTED_api2-rmp1.management.jp-east-1.local-28168-754045-1_200

<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <CORSRule>
    <AllowedOrigin>http://www.example.com</AllowedOrigin>
    <AllowedHeader>*</AllowedHeader>
    <AllowedMethod>PUT</AllowedMethod>
    <AllowedMethod>POST</AllowedMethod>
    <AllowedMethod>DELETE</AllowedMethod>
    <MaxAgeSeconds>3000</MaxAgeSeconds>
    <ExposeHeader>x-amz-server-side-encryption</ExposeHeader>
  </CORSRule>
  <CORSRule>
    <AllowedOrigin>*</AllowedOrigin>
    <AllowedHeader>Authorization</AllowedHeader>
    <AllowedMethod>GET</AllowedMethod>
    <MaxAgeSeconds>3000</MaxAgeSeconds>
  </CORSRule>
</CORSConfiguration>

  
  • ※本ページ記載の金額は、すべて税抜表示です。
  • ※本ページ記載の他社製品名および会社名などは、各社の商標または登録商標です。
  • ※本ページの内容は、2023年9月05日時点の情報です。

推奨画面サイズ 1024×768 以上