• 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

  • We are developing a new feature in Plesk that will help you promote your websites or business on social media. We want to conduct a one-hour online UX test to present the prototype and collect feedback. If you are interested in the feature, please book a meeting via this link.
    Thank you in advance!
  • 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.

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