Merge pull request #514 from ploxiln/readme_auth_request_body

README: fix nginx auth_request example for requests with body
This commit is contained in:
Tanvir Alam 2018-01-16 10:47:41 -05:00 committed by GitHub
commit 1a82180376
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -387,6 +387,15 @@ server {
proxy_set_header X-Scheme $scheme; proxy_set_header X-Scheme $scheme;
proxy_set_header X-Auth-Request-Redirect $request_uri; proxy_set_header X-Auth-Request-Redirect $request_uri;
} }
location = /oauth2/auth {
proxy_pass http://127.0.0.1:4180;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
# nginx auth_request includes headers but not body
proxy_set_header Content-Length "";
proxy_pass_request_body off;
}
location / { location / {
auth_request /oauth2/auth; auth_request /oauth2/auth;