• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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