I have the following configuration in nginx:
location /api/ {
auth_request /auth/request/;
auth_request_set $user $upstream_http_remote_user;
proxy_set_header Remote-User $user;
proxy_pass http://...;
}
I am setting the Remote-User
field, so I would expect that in the access log, the value would appear, but it's only -
that appear, indicating the value does not exist. In the server proxied there, I can access the header Remote-User
, so I know that the value is well set, but can't manage to display it in the access logs.
I suppose the access log are generated before the auth request maybe.
Is there a way to get the Remote-User
inside the access logs with this kind of configuration?