Thanks alot! I made a logical error when writing your expression by thinking that it will negate the comparison. Also, I appreciate you have explained that http/https matching as I was confused. My best regards, Vlad Maxim Dounin Wrote: ------------------------------------------------------- > Hello! > > On Mon, May 20, 2013 at 02:14:02PM -0400, vlad031@binkmail.com wby vlad031@binkmail.com - Nginx Mailing List - English
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 ($temby vlad031@binkmail.com - Nginx Mailing List - English
Also, Isn't this a bug since I have added server_names to valid_referers? And since server_names knows the domain, it should work... Any ideas?by vlad031@binkmail.com - Nginx Mailing List - English
Sorry for posting here - don't know for sure if it's the right place. I have an issue: 1) I use nginx as reverse proxy, but I don't always know the domain name for which I'm serving, so my setup looks like this: server_name _ $host 0.0.0.0; 2) I try to block invalid referers but when I try to add $host to valid_referers - it doesn't seem to work: valid_referers none blocked server_by vlad031@binkmail.com - Nginx Mailing List - English