Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Remove Cache-Control header on matchingfiles |
|
Author |
|
gijs
Joined: 27 Apr 2012 Posts: 189 Location: The Netherlands
|
Posted: Sun 07 May '17 23:06 Post subject: Remove Cache-Control header on matchingfiles |
|
|
I've configured Apache as a reverse proxy and enabled caching.
I've noticed that certain files are not being cached.
To prevent this I had set: Header unset Cache-Control
However, this also causes issues with login pages and user specific pages.
I've now set:
Code: | <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css)$">
Header unset Cache-Control
</FilesMatch> |
However my .png files are still set with a private cache-control header.
Any idea how I can fix this?
Perhaps the path: domain.com/User_Themes/1/81c96704-feb1-4758-85d7-caa85671eb09/Images/ControlPanel/ isn't being included in the filesmatch directive? |
|
Back to top |
|
gijs
Joined: 27 Apr 2012 Posts: 189 Location: The Netherlands
|
Posted: Mon 08 May '17 23:19 Post subject: |
|
|
The solution was to use Location, instead of Filesmatch:
Code: | <Location ~ \.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|ashx)$>
Header unset Cache-Control
</Location>
|
Apparently FilesMatch doesn't work for proxied content. |
|
Back to top |
|
|
|
|
|
|