Created
October 18, 2011 10:59
-
-
Save Ephigenia/1295164 to your computer and use it in GitHub Desktop.
nginx-fb-hotlinking-hb-2
This file contains hidden or 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
| # apply this rule on any location that’s an image using Regexp | |
| location ~* \.(png|gif|jpg|jpeg|swf|ico)(\?[0-9]+)?$ { | |
| # block empty blocked or whiteliste referers | |
| valid_referers none blocked horrorblog.org www.horrorblog.org ~\.google\. ~\.yahoo\. ~\.bing\. ~\.facebook\. ~\.fbcdn\.; | |
| if ($invalid_referer) { | |
| return 403; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment