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

Use nginx to proxy harbor can lead to unexpect problem  #20530

Closed
Linindoo opened this issue May 31, 2024 · 3 comments
Closed

Use nginx to proxy harbor can lead to unexpect problem  #20530

Linindoo opened this issue May 31, 2024 · 3 comments

Comments

@Linindoo
Copy link

Is your feature request related to a problem? Please describe.
We use nginx to proxy harbor,the harbor is deploy at http and the nginx is over https,
when client request pull or push ,the harbor response fail with 401 code, and the response header Www-Authenticate content is like realm="http://<hostname>:<port>/service/token",so the client has to request the token over http

Describe the solution you'd like
I wish to config the realm url with harbor.yml

@Kajot-dev
Copy link

It's difficult to say what is wrong withou nginx configuration. Perhaps you are not routing locaion /service to the core component?

For start I would recommend looking at nginx configuration which is used by the official harbor helm chart:

@Linindoo
Copy link
Author

Linindoo commented Jun 3, 2024

It's difficult to say what is wrong withou nginx configuration. Perhaps you are not routing locaion /service to the core component?

For start I would recommend looking at nginx configuration which is used by the official harbor helm chart:

We use Gateway In front of harbor,so the harbor is just config by http, and the realm is always return the http url, we want to custom config the realm url but it was not support

@stonezdj
Copy link
Contributor

stonezdj commented Jun 3, 2024

The realm (service token url) is the same as <externalURL>/service/token, if you want to change it you could customize it in the harbor.yaml or values.yaml

@stonezdj stonezdj closed this as completed Jun 3, 2024
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

3 participants