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

Supports custom headers when the ui is used as proxy #89

merged 2 commits into from Jul 2, 2019


Copy link

commented Jun 30, 2019


Headers can be useful in some cases such as avoid sending credentials when you are on the UI (like #87). Or give to the registry server other properties such as X-Forward-For or Server headers for monitoring.

How to use ?

This is compatible only with static version of the UI and used with REGISTRY_URL variable.
When you want to add a custom header, add to the registry ui a environment variable or entry in /etc/nginx/.env which looks like NGINX_PROXY_HEADER_Custom_Header. All underscores (_) will be replaced by hyphens (-).

Some example of custom headers as variable:

  • NGINX_PROXY_HEADER_Authorization for Basic auth credentials
  • NGINX_PROXY_HEADER_X_Forwarded_For for identifying the originating IP address of a client

An example is bundled with this PR

Any feedback @marcusblake ?

closes: #87


This comment has been minimized.

Copy link
Owner Author

commented Jun 30, 2019

I can also add a supports for custom headers from a file, like you did in #87 and this will supersede your PR


This comment has been minimized.

Copy link

commented Jul 1, 2019

This is great! I believe adding support for custom headers from files (especially credentials) would be a great feature to add as well.

feat: Supports custom headers via file `/etc/nginx/.env`
Remove the print of headers for security

@Joxit Joxit merged commit 7777ff2 into master Jul 2, 2019

@Joxit Joxit deleted the custom-headers branch Jul 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.