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

Reply via email to