-
Notifications
You must be signed in to change notification settings - Fork 19
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
Issues with reverse proxy and serving from subdirectory. #10
Comments
Are you setting APPLICATION_ROOT in flask? |
Also @sonicnkt feel free to ping me if you have a question like this, I have a fair bit of experience with python/flask and I'd like to support this project. Didn't see this issues until now though. |
hehe i had not and stumbled upon this setting a few days ago. Didnt have time to test this yet tho. I will try this in the next few days and report back. If i cant get it to work i will gladly ask you for more support :) |
Be aware that if you're trying to use cookie sub-domains (so you can use an example.com cookie on foo.example.com) it's not going to work on Traefik will proxy the glauth server instead of the forbidden server when using it's "Authentication Based on Subrequest Result" equivalent, there might be a way to set up nginx similarly. I'm a bit tied in to traefik for complicated reasons, but the forward_auth stuff I'm working on assumes that glauth is proxied instead of the app we want to authenticate for. Or it could be that you're doing this for some entirely different reason that has nothing to do with cookie domains, in which case ignore all that. |
Finally figured this out... Since we are using gunicorn for deployment this is completely configured outside of flask and no To get this working add the
And configure your proxy like this (nginx):
It is important that you also set the path/prefix in the proxy_pass setting. |
I added the following config option to solving issues using nginx as reverse proxy and serving the app in the subdirectory like
subdomain.example.com/glauth
:I still cant get this to work tho and only getting 404 erros when trying to access anything.
Any help on this would be very much appreciated :)
I tried:
as well as
Settings the
SERVER_NAME
tosubdomain.example.com/glauth
makes the all links look correct but it still results in 404 errors. Without the subdirectory everything works without any issues even without the server_name set.The issues is probably with some of the proxy_header settings but i dont have much experience with this.
The text was updated successfully, but these errors were encountered: