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

Ability to PASS headers via nginx proxy #206

Closed
dominch opened this issue Sep 9, 2021 · 3 comments
Closed

Ability to PASS headers via nginx proxy #206

dominch opened this issue Sep 9, 2021 · 3 comments
Milestone

Comments

@dominch
Copy link

dominch commented Sep 9, 2021

I'm trying to set up ui with nginx proxy and pass basic http authentification via proxy. With that browser should ask for username and password, then send them via proxy. Right now there is ability to set some headers (including some auth data), but I need to read auth data from browser and send those.

In short I need to add proxy_pass_header Authorization line into nginx proxy configuration,

Right now there is no right option to do that, I inspected templates and following is working:

          env:
            - name: NGINX_PROXY_PASS_URL
              value: "https://my-registry.net"
            - name: NGINX_PROXY_HEADER_Host
              value: "my-registry.net"
            - name: NGINX_PROXY_HEADER_Authorization
              value: "$http_authorization"
            - name: NGINX_PROXY_HEADER_Pass
              value: 1\"; proxy_pass_header  \"Authorization

This will add fake header Pass and inject extra configuration instruction. This should not work as it's potential big security issue, but this allowed me to configure missing thing. With that I got what I wanted - passed auth data and working GUI, but I hope to see new env var in future to allow this task.

@Joxit
Copy link
Owner

Joxit commented Nov 8, 2021

Hi, thank you for using my project and your feature request 😊

I added the set of options NGINX_PROXY_PASS_HEARER_* for you, this will be available in 2.1.0 soon and is already available in main/master tags 🎉

If you are using docker compose, you must set value (empty or not) for the environment (e.g - NGINX_PROXY_PASS_HEARER_Authorization=)

@dominch
Copy link
Author

dominch commented Nov 9, 2021

thanks :)
I'll test it on next release :)

@Joxit
Copy link
Owner

Joxit commented Nov 9, 2021

2.1.0 released ! 🚀

@Joxit Joxit added this to the 2.1.0 milestone Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants