Welcome! Log In Create A New Profile

Advanced

Re: Question about IF and auth subrequest

Maxim Dounin
February 24, 2021 03:04PM
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@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: 200
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