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

Cross Site Request to Registry blocked by Browser #55

Closed
Xnyle opened this issue Nov 29, 2018 · 6 comments
Closed

Cross Site Request to Registry blocked by Browser #55

Xnyle opened this issue Nov 29, 2018 · 6 comments
Labels

Comments

@Xnyle
Copy link

Xnyle commented Nov 29, 2018

I deployed joxit/docker-registry-ui:arm64v8 via k8s, all went well, but after I add a registry I get the following warning as a popup on the bottom:

An error occured: Check your connection and your registry must have Access-Control-Allow-Origin header set to http://192.168.126.3

The frontend is opening http://192.168.126.2:5000/v2/_catalog?n=100000 but this request is blocked.

When opening the url in a new tab I get a response:

{ "repositories": [ "helloworld" ] }

So registry and registry ui are working, I just don't know how to get it working without DNS entries?

Any suggestions?

@Xnyle Xnyle changed the title Cross Site Request blocked by Chrome Cross Site Request to Registry blocked by Chrome Nov 29, 2018
@Xnyle Xnyle changed the title Cross Site Request to Registry blocked by Chrome Cross Site Request to Registry blocked by Browser Nov 29, 2018
@Xnyle
Copy link
Author

Xnyle commented Nov 29, 2018

I changed the k8s LoadBalancer config so that both services (ui and registry) are on the same ip.
But that didn't solve the problem. The port is still different of course.

@Joxit
Copy link
Owner

Joxit commented Nov 29, 2018

Hello,

You can check the README and this comment which explain CORS errors #25 (comment)

If you don't need the multi registries feature, you can use the static version examples here

@Joxit Joxit added the question label Nov 29, 2018
@Xnyle
Copy link
Author

Xnyle commented Nov 29, 2018

Yeah, sorry, read over that part a few times cause I thought that was only Docker Compose config stuff.
Just figured out that you have to put that "stuff" in an envFrom.configMapRef with k8s.
Steep learning curve figuring out what all those container lego pieces do.

@Joxit
Copy link
Owner

Joxit commented Dec 1, 2018

😄
Does it works now ? I can't close this issue ?
Maybe one day I would put a complete example for k8s 😄

@Xnyle
Copy link
Author

Xnyle commented Dec 2, 2018

Yeah thanks that's working now, the doc about URL and REGISTRY_URL could be less misleading though.

@Joxit
Copy link
Owner

Joxit commented Dec 8, 2018

Ok, thank you 😄
I will try to update the doc so

@Joxit Joxit closed this as completed Dec 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants