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;
}
Re: map directive in nginx work only in first variant
January 27, 2020 01:31PM
Did you resolve this by yourself ? This is advanced nginx configuration.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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