通过变量定义越过
set $my_ip '';
if ( $http_x_forwarded_for ~ "192\.168\.0\.2" ){ set $my_ip 1;}
if ( $http_x_forwarded_for ~ "192\.168\.0\.3" ){ set $my_ip 1;}
if ( "$my_ip" != 1 ) {
return 403 "not allow to access";
}
通过变量定义越过
set $my_ip '';
if ( $http_x_forwarded_for ~ "192\.168\.0\.2" ){ set $my_ip 1;}
if ( $http_x_forwarded_for ~ "192\.168\.0\.3" ){ set $my_ip 1;}
if ( "$my_ip" != 1 ) {
return 403 "not allow to access";
}