Joxit / docker-registry-ui

The simplest and most complete UI for your private registry

Home Page:https://joxit.dev/docker-registry-ui/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unconfigured CORS policy on s3 bucket causes failure

JKDingwall opened this issue · comments

Hi, I use this docker registry UI version 2.0.2 and I have an issue...

Bug description

I have a server which runs the docker registry and the registry UI. The registry images are stored in CEPH and accessible via another host running radosgw configured with the s3 interface. The UI is able to list / browse the images stored in the registry but requests directly to the rados gw server fail with a CORS error.

This is the error recorded in the Firefox developer console:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://rgw.example.com/docker/docker/registry/v2/blobs/sha256/etc/etc. (Reason: CORS header 'Access-Control-Allow-Origin' missing).

No CORS policy was configured on the bucket:

# s3cmd info s3://docker
s3://docker/ (bucket):
   Location:  country
   Payer:     BucketOwner
   Expiration Rule: none
   Policy:    none
   CORS:      none
   ACL:       Docker Registry (Country/City): FULL_CONTROL

After applying a policy to the bucket the issue with the UI was resolved. I'm making a mention of this here in case it is a useful tip to add to documentation.

Hi, thank you for using my project and submitting issues with tips 😄 I added a section in the FAQ and your name in my contribution list