Skip to content

Conversation

Joxit
Copy link
Owner

@Joxit Joxit commented Jun 30, 2019

Background

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

@Joxit
Copy link
Owner Author

Joxit 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

@marcusblake
Copy link

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

Remove the print of headers for security
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

Successfully merging this pull request may close these issues.

2 participants