diff --git a/static/.htaccess b/static/.htaccess index 371aa0a..33cb373 100644 --- a/static/.htaccess +++ b/static/.htaccess @@ -1,15 +1,22 @@ Header set Access-Control-Allow-Origin: https://oe7drt.com Header set Vary: Origin +# Hotlink images prevention +# rewrite to the `hotlinked.png` image and show this to any +# hot-linking origin page +# https://techexpert.tips/apache/apache-prevent-image-hotlinking/ + RewriteEngine On RewriteCond %{REQUEST_URI} !hotlinked\.png$ RewriteCond "%{HTTP_REFERER}" "!^$" RewriteCond "%{HTTP_REFERER}" "!oe7drt.com" [NC] -RewriteRule "\.(gif|jpg|png)$" "https://oe7drt.com/hotlinked.png" [R,L] +RewriteRule "\.(gif|jpe?g|png)$" "https://oe7drt.com/hotlinked.png" [R,L] + +# sends a 403 Forbidden -#SetEnvIf Referer "oe7drt\.com" localreferer -#SetEnvIf Referer ^$ localreferer -# +# SetEnvIf Referer "oe7drt\.com" localreferer +# SetEnvIf Referer ^$ localreferer +# # Require env localreferer -# +# diff --git a/static/hotlinked.png b/static/hotlinked.png index 871dbfd..0d2fee6 100644 Binary files a/static/hotlinked.png and b/static/hotlinked.png differ