Skip to content

Instantly share code, notes, and snippets.

@netdna
Created April 26, 2012 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save netdna/2501099 to your computer and use it in GitHub Desktop.
Save netdna/2501099 to your computer and use it in GitHub Desktop.
nginx - return a 403 response for certain referers
#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