Welcome! Log In Create A New Profile

Advanced

Re: 301 executes before authentication

Robert Paprocki
October 05, 2015 03:50PM
Rewrites will execute before authentication module handlers run; this is a
function of how Nginx is designed, and this order isn't configurable. See
http://forum.nginx.org/read.php?2,41891,43112#msg-43112 and
http://www.nginxguts.com/2011/01/phases/.

On Mon, Oct 5, 2015 at 12:42 PM, Richard Stanway <r1ch+nginx@teamliquid.net>
wrote:

> How are you testing? 301 is permanent so it may be cached if you added the
> auth after the redirect. Try testing with curl from the command line to
> verify your results.
>
> On Mon, Oct 5, 2015 at 7:05 PM, Grant <emailgrant@gmail.com> wrote:
>
>> I have a server block that contains the following:
>>
>> auth_basic "Please log in.";
>> location = / {
>> return 301 https://$host:$server_port/folder/;
>> }
>>
>> I noticed that /folder/ is appended to the URL before the user is
>> prompted for authentication. Can that behavior be changed?
>>
>> - Grant
>>
>> _______________________________________________
>> nginx mailing list
>> nginx@nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx
>>
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

301 executes before authentication

Grant October 05, 2015 01:08PM

Re: 301 executes before authentication

Richard Stanway October 05, 2015 03:44PM

Re: 301 executes before authentication

Robert Paprocki October 05, 2015 03:50PM

Re: 301 executes before authentication

Grant October 06, 2015 09:18AM

Re: 301 executes before authentication

B.R. October 06, 2015 10:18AM

Re: 301 executes before authentication

Grant October 07, 2015 11:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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