301 executes before authentication

Richard Stanway r1ch+nginx at teamliquid.net
Mon Oct 5 19:42:45 UTC 2015


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 at 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 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/20151005/07df4cbe/attachment.html>


More information about the nginx mailing list