Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Bloccare hotlinking su server Nginx - ADV
# è possibile definire una cartella da bloccare
# location = /immagini/vietato_rubare.png
# oppure i tipi di file
location ~ \.(gif|png|jpg|jpeg|JPG|GIF|JPEG|PNG)$ {
valid_referers none blocked *;
if ($invalid_referer) {
rewrite \.(gif|png|jpg|jpeg|JPG|GIF|JPEG|PNG)$ redirect;
# alternativa
# rewrite ^(.*)$ last;

This comment has been minimized.

Copy link
Owner Author

evemilano commented Feb 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.