Welcome! Log In Create A New Profile

Advanced

Re: log_subrequest and auth_request

Maxim Dounin
November 05, 2015 12:34PM
Hello!

On Mon, Nov 02, 2015 at 05:37:00PM -0500, jstangroome wrote:

> Hi,
>
> I have set `log_subrequest on;` at the http level and I am using to
> `auth_request` to a location that does a `proxy_pass` but I am not seeing
> the details of the auth subrequest in the access.log. Should this work?
>
> Conf:
>
> > log_subrequest on;
> > server{
> > location / {
> > auth_request /authorize;
> > # ...
> > }
> > location /authorize {
> > proxy_pass http://authserver/doauth;
> > }
> > }

Works fine here. Note though, that with default logging format
(with $request, see http://nginx.org/r/log_format) is mostly
impossible to distinguish a subrequest from the main request, as
$request will be identical for both. You have to log $uri to see
the difference.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

log_subrequest and auth_request

jstangroome November 02, 2015 05:37PM

Re: log_subrequest and auth_request

Maxim Dounin November 05, 2015 12:34PM

Re: log_subrequest and auth_request

jstangroome November 07, 2015 07:42PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 159
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready