Add ability to restrict http referrer

This commit is contained in:
Connor Peet 2015-06-14 18:26:40 +10:00 committed by Will Norris
parent 8c13d93bde
commit 9213c93c94
5 changed files with 68 additions and 15 deletions

View file

@ -153,6 +153,17 @@ full-size codercat image, and one for the resized 500px version.
[codercat URL]: http://localhost:8080/500/https://octodex.github.com/images/codercat.jpg
### Referrer Whitelist ###
You can limit images to only be accessible for certain hosts in the HTTP referrer header. This may be useful to prevent others from hotlinking to images, and using your valuable bandwidth! It can be enabled be running:
imageproxy -referrers example.com
Reload the [codercat URL][], and you should now get an error message. You can
specify multiple hosts as a comma separated list, or prefix a host value with
`*.` to allow all sub-domains as well.
### Host whitelist ###
You can limit the remote hosts that the proxy will fetch images from using the