Files
DirectAdmin-1.62.4/directadmin-1.62.4/data/templates/hotlink.nginx.conf
tuend-work 0b28a76e20 ud
2025-11-12 23:24:15 +07:00

16 lines
330 B
Plaintext

|*if allow_blank_referer!="yes"|
|?ALLOWED_LIST=`ALLOWED_HOTLINK_DOMAINS`|
|*else|
|?ALLOWED_LIST= none`ALLOWED_HOTLINK_DOMAINS`|
|*endif|
location ~ \.(|FILES|)$ {
valid_referers|ALLOWED_LIST|;
if ($invalid_referer) {
|*if redirect="forbidden"|
return 403;
|*else|
rewrite (.*)\.(|FILES|)$ |redirect|;
|*endif|
}
}