valid_referers directive not working correctly

justin nginx-forum at nginx.us
Mon Nov 12 09:19:23 UTC 2012


Ahh right, so basically I have to copy:

valid_referers server_names not-my-domain.com;
if ($invalid_referer) {
  return 403;
}

Into the php match block. Is there a way to do this without having the same
exact code copied into both location blocks?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,232722,232724#msg-232724



More information about the nginx mailing list