will oauth2_proxy support PUT
I got oath2_proxy working with openresty/nginx.
However, I have noticed an issue or not...
Lets say I made a PUT request to my nginx, request hands to oauth2_proxy for authentication/authorization.
When oauth2_proxy finishes (validating access token, refresh token, etc...), it redirect back to nginx but now with a 'GET' instead of 'PUT'.
Is this normal? a feature?
Thanks
The first request from browser which is not already "logged-in" to oauth2_proxy will go through the oauth2 flow and end up with a redirect back to the original destination, with method changed to GET (and no body, of course).
Subsequent requests will carry the cookie which oauth2_proxy will recognize, and the PUT will go through to the backend service unchanged.
If you're using the nginx auth_request directive, it's a bit more complicated: the auth request to oauth2_proxy will not include the body, but will have the original Content-Length header, which will confuse oauth2_proxy into waiting for a body which will not come. The README has the nginx config options to correct for this.
Yes, auth_request is being used...
Are you referring to these lines?
proxy_set_header Content-Length "";
proxy_pass_request_body off;
Regards,