Welcome! Log In Create A New Profile

Advanced

nginx priority for rewrite and access restriction

kay
May 27, 2014 08:19AM
I would like to enable /123 location only for locahost, but it doesn't work, nginx return 302 redirect with header. It seems rewrite directive has higher priority than access module.

location /123 {
satisfy all;
allow 127.0.0.1/32;
deny all;
add_header Set-Cookie "cookie=123; Domain=localhost";
rewrite ^ / redirect;
}

How to restrict access for /123 location without "if"?
Subject Author Posted

nginx priority for rewrite and access restriction

kay May 27, 2014 08:19AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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