Welcome! Log In Create A New Profile

Advanced

map directive in nginx work only in first variant

Posted by tarmacmonsterg 
map directive in nginx work only in first variant
November 27, 2019 03:32AM
I try to use map directive. I have 2 vars and if first var exist set it to new var, or if only second var exist, set it to new var. My config:

map "$arg_arg1:$cookie_1" $new_var {
"~^.*:" $arg_arg1;
"~:.*$" $cookie_1;
default "new";
}
Work only in first situation.

nginx
Re: map directive in nginx work only in first variant
November 27, 2019 04:46AM
Working config:
map "$cookie_1:$arg_arg1" $new_var {
default "new";
"~:.*$" $arg_arg1;
"~*^.*:$" $cookie_1;
}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 74
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready