@@ -425,6 +425,10 @@ server {
425425 proxy_set_header X-User $user;
426426 proxy_set_header X-Email $email;
427427
428+ # if you enabled --pass-access-token, this will pass the token to the backend
429+ auth_request_set $token $upstream_http_x_auth_request_access_token;
430+ proxy_set_header X-Access-Token $token;
431+
428432 # if you enabled --cookie-refresh, this is needed for it to work with auth_request
429433 auth_request_set $auth_cookie $upstream_http_set_cookie;
430434 add_header Set-Cookie $auth_cookie;