git.iko.soy/typeable/oauth2-proxy
on master help sign in
README: nginx auth_request example refresh cookie handling

how to pass back the refreshed oauth2_proxy cookie from an nginx auth_request

commit6d295f8446b084bbfb81d94ac4058c466df443e9 authorPierce Lopez <pierce.lopez@gmail.com> dateMon 24 Apr 2017, 17:59 (10 years ago) parent7f5672b
1 file changed+4
README.md+4
README.md+4
@@ -373,6 +373,10 @@ server {
373373 proxy_set_header X-User $user;
374374 proxy_set_header X-Email $email;
375375
376+ # if you enabled --cookie-refresh, this is needed for it to work with auth_request
377+ auth_request_set $auth_cookie $upstream_http_set_cookie;
378+ add_header Set-Cookie $auth_cookie;
379+
376380 proxy_pass http://backend/;
377381 # or "root /path/to/site;" or "fastcgi_pass ..." etc
378382 }