Question about IF and auth subrequest

Vincent Blondel vbl5968 at gmail.com
Thu Feb 25 16:38:06 UTC 2021


Thank You for the update,
Will try and let You know ...
-V.

On Wed, Feb 24, 2021 at 9:03 PM Maxim Dounin <mdounin at mdounin.ru> wrote:

> Hello!
>
> On Wed, Feb 24, 2021 at 06:44:49PM +0100, Vincent Blondel wrote:
>
> > Thank You for the swift answer Maxim.
> > If I understand, you mean something like that should be going to Work ...
> >
> > location /subrequest/ {
> > proxy_pass xxx;
> > }
> > location /anyrequest/ {
> > auth_request /subrequest/;
> > error_page 400 = @fallback;
> > proxy_pass xxx;
> > }
> > location @fallback {
> > proxy_pass_request_body off;
> > proxy_set_header Content-Length "";
> > proxy_pass http://backend;
> > }
>
> Sort of, but you have to use 401 or 403, see the auth_request
> documentation (
> http://nginx.org/en/docs/http/ngx_http_auth_request_module.html).
>
> --
> Maxim Dounin
> http://mdounin.ru/
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20210225/eb842b3f/attachment.htm>


More information about the nginx mailing list