3 messages in ru.sysoev.nginxRe: wildcards in valid_referers
FromSent OnAttachments
Ian M. EvansNov 26, 2007 9:53 pm 
Igor SysoevNov 26, 2007 10:10 pm 
Ian M. EvansNov 26, 2007 10:24 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: wildcards in valid_referersActions...
From:Igor Sysoev (is-G@public.gmane.org)
Date:Nov 26, 2007 10:10:20 pm
List:ru.sysoev.nginx

On Tue, Nov 27, 2007 at 12:53:53AM -0500, Ian M. Evans wrote:

I just updated my nginx from the 4.x series and noticed that a line in my config was causing errors.

One of the domains in my old valid_referers line was *.google.* to catch all the variations (like images.google.com and all the national variants like .ca, .co.uk, etc.

The 5.X series nginx doesn't seem to like that line. How should I change it to make sure it catches all the google variants so I can exempt them from my hotlinking check?

The old versions did not support it too, although they did not warn about this. Now you may use regex:

valid_referers ~\.google\. ;

Note the first '~'.