• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Hotlink protection and Expire headers doesn't work together

ChrisCP

Basic Pleskian
I tried to add hotlink protection to my domains. This also works as far as the expires headers no longer work or vice versa. Is this a bug or am I doing something wrong? I don't use WordPress sites. Can someone help me there? I use latest Obsidian version, CentOS 7.7 and Nginx.
 
Last edited:
I made it at domain level. Added in additional nginx directives.

Code:
location ~ \.(gif|png|jpeg|jpg|svg|webp)$ {
    valid_referers none blocked ~.google. ~.bing. ~.yahoo. mydomain.com;
    if ($invalid_referer) {
        return   403;
    }
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|woff|woff2|ttf|webp)$ {
    expires 365d;
}

In this case hotlinkprotection works but not expires header.
 
Back
Top