Welcome! Log In Create A New Profile

Advanced

"map" command question

Posted by cisaksen 
"map" command question
July 17, 2017 03:51PM
I'm using the map command to try and filter out crawler traffic. It seems to fail, or at least not work the why I would like when x_forwarded_for has more than 1 IP.

map $http_x_forwarded_for $notacrawler {

default 1;
ip1 0;
ip 2 0;
}

my question is how map is functioning underneath. If x_forwarded_for has 2 or more ip's listed does map - map the whole list of ip's to the variable (in this case $notacrawler) or just the last one ?

Thanks
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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