Supports custom headers when the ui is used as proxy #89
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
orServer
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 likeNGINX_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 credentialsNGINX_PROXY_HEADER_X_Forwarded_For
for identifying the originating IP address of a clientAn example is bundled with this PR
Any feedback @marcusblake ?
closes: #87