-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
Cors error when looking at details of image #385
Comments
Hi. It's not possible to see on your screenshots what port you connect with GET request. You also exposed port 5000 on registry-server, but 443 was mentioned on your screenshot. Or if you connect directly to exposed port of registry server (5000) what's a question about UI? :) Anyway I also have setup with user:password authorization on Registry server, but I din't have any problems using docker or skopeo commands (my problems is self-signed TLS validation when UI connects to Registry Server only). You can take a look here, may be you'll find something helpful. Also take a look at this page about 'CORS'. |
Hi, thank you for using my project and submitting issues. Are you using token authentication? If so, you may need to configure the CORS policy of your auth server. Keycloak's one wasn't working so I made this example with a nginx proxy: https://github.com/Joxit/docker-registry-ui/blob/main/examples%2Ftoken-auth-keycloak%2Fconf%2Fproxy%2Fnginx.conf |
The docker registry runs on port 5000, but I'm routing it through nginx. That is why I'm connecting to port 443 in my docker registry ui.
I'm using basic auth (username-password). When looking at the dev tools, I can see that the preflight request does not include any authentication. That's probably why I am getting the cors error. When I manually make the request to my docker registry, I'm not encountering any problems. |
The preflight request is not meant to return any authentication. The browser will send the OPTION request and the server must return a 200 response with specific headers in its response. If the header aren't present, you will not be able to authenticate via your browser. Required headers are :
So if your server is not sending these headers on the OPTION request, check the nginx configuration in the keycloak example I shared |
Bug description
I'm getting a cors error when visiting the page of a specifc image.
How to Reproduce
My docker-compose file
My private docker registry configuration
Expected behavior
I would expect the page to load and show all the relevant information
Screenshots
Note: the main page (with the catalog request) works without any problems.
System information
The text was updated successfully, but these errors were encountered: