Hello,
Thank you for your example Maxim. This is what I've wrote in my config:
set $temp "$host:$http_referer";
valid_referers none blocked server_names ~\.google\. ~\.yahoo\. ~\.bing\. ~\.ask\. ~\.live\. ~\.googleusercontent.com\. ;
if ($invalid_referer){
set $test A ;
}
if ($temp ~* "^(.*):http?://\1") {
set $test "${test}B";
}
if ($temp ~* "^(.*):https?://\1") {
set $test "${test}C";
}
if ($test = ABC) {
return 444 ;
}
It is always returning 444 ... what am I doing wrong?!
Thank you for your example Maxim. This is what I've wrote in my config:
set $temp "$host:$http_referer";
valid_referers none blocked server_names ~\.google\. ~\.yahoo\. ~\.bing\. ~\.ask\. ~\.live\. ~\.googleusercontent.com\. ;
if ($invalid_referer){
set $test A ;
}
if ($temp ~* "^(.*):http?://\1") {
set $test "${test}B";
}
if ($temp ~* "^(.*):https?://\1") {
set $test "${test}C";
}
if ($test = ABC) {
return 444 ;
}
It is always returning 444 ... what am I doing wrong?!