Note: If multiple Ceph Object Gateway daemons are deployed, you must configure CORS settings for each daemon.
-
ceph config set client.rgw.DAEMON rgw_gcors_allow_origins "ALLOWED_ORIGIN"
Note: The allowed origin must match the Object Browser URL used to access the Object Browser, including the protocol and port.
-
ceph config set client.rgw.DAEMON rgw_gcors_allow_methods "GET,PUT,POST,DELETE,OPTIONS,HEAD"
-
ceph config set client.rgw.DAEMON rgw_gcors_allow_headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,Amz-Sdk-Invocation-Id,Amz-Sdk-Request,X-Amz-Date,X-Amz-Content-Sha256,X-Amz-Security-Token,X-Amz-Target,x-amz-user-agent,x-amz-sdk-checksum-algorithm,x-amz-checksum-crc32,x-amz-bucket-object-lock-enabled,x-amz-tagging"
-
ceph config set client.rgw.DAEMON rgw_gcors_expose_headers "Content-Length,Content-Range,ETag,Amz-Request-Id,Amz-Id-2,X-Amz-Request-Id,X-Amz-Id-2,x-amz-version-id"
The DAEMON is in the format HOSTNAME.UNIQUE_ID. For example, ceph-node-01.qmfff.
For example,
[ceph: root@host01 /]# ceph config set client.rgw.ceph-node-01.qmfff rgw_gcors_allow_origins "https://192.168.100.100:8080"
[ceph: root@host01 /]# ceph config set client.rgw.ceph-node-01.qmfff rgw_gcors_allow_methods "GET,PUT,POST,DELETE,OPTIONS,HEAD"
[ceph: root@host01 /]# ceph config set client.rgw.ceph-node-01.qmfff rgw_gcors_allow_headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,Amz-Sdk-Invocation-Id,Amz-Sdk-Request,X-Amz-Date,X-Amz-Content-Sha256,X-Amz-Security-Token,X-Amz-Target,x-amz-user-agent,x-amz-sdk-checksum-algorithm,x-amz-checksum-crc32,x-amz-bucket-object-lock-enabled,x-amz-tagging"
[ceph: root@host01 /]# ceph config set client.rgw.ceph-node-01.qmfff rgw_gcors_expose_headers "Content-Length,Content-Range,ETag,Amz-Request-Id,Amz-Id-2,X-Amz-Request-Id,X-Amz-Id-2,x-amz-version-id"