-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
More fully support X-Auth-Request-Redirect header #248
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
More fully support X-Auth-Request-Redirect header #248
Conversation
Docs showed that the X-Auth-Request-Redirect header can specify a redirect URI, but only the rd POST parameter was being honored This fixes that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think previously the header was honoured when going via the login page but not when going directly to the start
page as used in the Nginx Auth Request
Happy with the code, could you please add a note to the changelog though and could you expand a little on how you've tested this? Just trying to understand what your use case and behaviour observations have been, thanks
Hi @JoelSpeed -- sorry for the delay there. We've got a domain that redirects all subdomain requests to internal IP addresses after a successful auth. This directive wasn't working before my changes:
If the auth request initially came with a I don't remember exactly how I tested this (probably a couple of curl requests), but I can flesh something out if important. |
Note, I suggested this nearly 2 years ago in bitly/oauth2_proxy#521, we've been running with the patch in production since that time as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you and congrats on your first contribution! 🎉
Docs showed that the X-Auth-Request-Redirect header can specify a redirect URI, but only the rd POST parameter was being honored
This fixes that.