-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Redirect Option #160
base: master
Are you sure you want to change the base?
Redirect Option #160
Conversation
You can update the pull request by just pushing additional commits into the branch, you don't need to open a new pull request. Also, you'll probably be asked to squash trivial/fixup commits together at the end (and the result can be force-pushed to this branch, and will update this pull request, without opening a new one). |
@cpgravlee can you help me understand the use case you are targeting? They way oauth2_proxy is written, if you go to |
The use case is a nginx instance that references different oauth2_proxy instances for each endpoint. So say we have Without my changes, once authorization is complete it redirects back to |
We have a different use case where we want to redirect users hitting |
@cpgravlee I don't think this PR is necesary. If you start authentication from If you have a log trace that shows that isn't working for you or can clarify why that doesn't meet your need that'd be helpful. |
The reason that mine does not redirect is because when we point to |
@jehiah Any hints for the config parameter to redirect user back to the url when user starts authentication from. Once user start authentication form url (e.g. /abc/), oauth2_proxy will end up to redirect to / in my case. Config is attached below.
Fixed by adding
In my config, it seems that oauth2_proxy assumes front end proxy server to reserve "proxy-prefix" without strip off the prefix. In the webapp side, the protected webapp assumes the front end proxy server to strip off the prefix instead. Any hints to configure oauth2_proxy to behave as below:
|
An option to allow for redirection after authorization to something other than "/".
Potentially breaking change for config files, but needed to be changed to match underscore convention. ProxyPrefix string `flag:"proxy-prefix" cfg:"proxy_prefix"