Welcome! Log In Create A New Profile

Advanced

Question about IF and auth subrequest

Vincent Blondel
February 24, 2021 04:42AM
Hello all,
I have a quick question about the usage of IF and auth_request.
I would like to know if it is possible to use a IF statement to condition
the proxy behaviour of one /location depending on the response headers of
the sub auth request ...

location /subrequest/ {
proxy_pass xxx;
}
location /anyrequest/ {
auth_request /subrequest/;

if ($response_header ~ '' ) {
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_pass ...
}
if ($response_header !~ '' ) {
proxy_pass xxx;
}
}

Thank You in advance for your Support ...

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

Question about IF and auth subrequest

Vincent Blondel February 24, 2021 04:42AM

Re: Question about IF and auth subrequest

Maxim Dounin February 24, 2021 09:02AM

Re: Question about IF and auth subrequest

Vincent Blondel February 24, 2021 12:46PM

Re: Question about IF and auth subrequest

Maxim Dounin February 24, 2021 03:04PM

Re: Question about IF and auth subrequest

Vincent Blondel February 25, 2021 11:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 202
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