Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get default registries working? (getting CORS issue) #403

Open
bekraupov opened this issue Nov 22, 2024 · 1 comment
Open

How to get default registries working? (getting CORS issue) #403

bekraupov opened this issue Nov 22, 2024 · 1 comment

Comments

@bekraupov
Copy link

hi,

we have few internal registries we would like to expose using this registry UI.

below are the values we are setting:

iu.proxy: false
- name: DEFAULT_REGISTRIES
              value: "https://reg1.example.com,https://reg2.example.com"
registry.enabled: false 

and we dont have "registry option enabled" (so running just UI).

UI is opening up, but when we try to access it, I can see we are getting CORS error in network tab (in Chrome):

Access to XMLHttpRequest at 'https://reg1.example.com/v2/_catalog?n=1000' from origin 'https://AAA.BBB' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

What's the way out? I have tried to manually update nginx default.conf with "add-header" commands but no luck.

@Joxit
Copy link
Owner

Joxit commented Nov 26, 2024

Hi, this should be a configuration you have to do on you registries, see the documentation about CORS here : https://github.com/Joxit/docker-registry-ui?tab=readme-ov-file#using-cors
You an also check the FAQ with the long list of linked issues

You should do the add-header in front of your registries and not the UI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants