Last active
August 29, 2015 14:23
-
-
Save davidkeen/531bab2c0cb04ac2c6cf to your computer and use it in GitHub Desktop.
Block referer spam in Nginx
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
map $http_referer $bad_referer { | |
default 0; | |
"~semaltmedia\.com" 1; | |
"~100dollars-seo\.com" 1; | |
"~buttons-for-your-website\.com" 1; | |
"~best-seo-offer\.com" 1; | |
} | |
# Server block | |
# if ($bad_referer) { | |
# return 444; | |
# } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment