As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
I'm using Alfresco to store PDFs for my web application. However, when requesting these files directly, e.g. via
https://example.com/alfresco//download/attach/workspace/SpacesStore//b1b6f82c-e09a-4f99-b9be-01aed2f53882/demo.pdf?ticket=TICKET_26e8e8d14d97963e685879ab9a09cb2fb973ff85
the HTTP Cache-Control Header is set to "must-revalidate, max-age=0". This prevents the browser to cache these requests.
How can I modify this header? Alfresco Vers. 5.0
Are you using tomcat directly or a http server as reverse proxy (what you should do)?
for tomcat, you can manage cache control with the "expires filter", see Apache Tomcat 7 Configuration Reference (7.0.77) - Container Provided Filters
Directly from Tomcat. Why should I use a proxy?
Going to read the documentation, thanks!
I use a reverse proxy, because I can configure static content to be delivered by the http server, can display a friendly maintenance page for alfresco when it's down, handle https with the httpd, can hide my nodejs or angular SPAs behind the reverse proxy and use the same sitename (and avoid corse problems), can easily switch to a backup alfresco....
I used the code provided at the documentation page of Tomcat but it still responds with "must-revalidate, max-age=0".
Here is my web.xml: https://pastebin.com/GhXFh0jd (the ExpiresFilter is at the bottom). Does the "CacheExpiresFilter" influence the "ExpiresFilter" somehow?
Any ideas or should I post this at a Tomcat forum?