Skip to content

Commit 6d295f8

Browse files
committed
README: nginx auth_request example refresh cookie handling
how to pass back the refreshed oauth2_proxy cookie from an nginx auth_request
1 parent 7f5672b commit 6d295f8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

0 commit comments

Comments
 (0)