Created
April 26, 2012 17:26
-
-
Save jdorfman/2501118 to your computer and use it in GitHub Desktop.
nginx - return a 403 response for certain referers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#place this in nginx.conf or a vhosts | |
if ($http_referer ~* (keyword|domain.com|www.domain.com)) | |
{ return 403; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment