git.iko.soy/typeable/oauth2-proxy
on master help sign in
Merge pull request #514 from ploxiln/readme_auth_request_body

README: fix nginx auth_request example for requests with body

commit1a821803767473553425ace670f92af07fbc165e authorTanvir Alam <talam@users.noreply.github.com> dateTue 16 Jan 2018, 10:47 (9 years ago) parentd75f62620e87ed
1 file changed+9
README.md+9
README.md+9
@@ -387,6 +387,15 @@ server {
387387 proxy_set_header X-Scheme $scheme;
388388 proxy_set_header X-Auth-Request-Redirect $request_uri;
389389 }
390+ location = /oauth2/auth {
391+ proxy_pass http://127.0.0.1:4180;
392+ proxy_set_header Host $host;
393+ proxy_set_header X-Real-IP $remote_addr;
394+ proxy_set_header X-Scheme $scheme;
395+ # nginx auth_request includes headers but not body
396+ proxy_set_header Content-Length "";
397+ proxy_pass_request_body off;
398+ }
390399
391400 location / {
392401 auth_request /oauth2/auth;