volto icon indicating copy to clipboard operation
volto copied to clipboard

Volto returns Cache-Control: public, max-age=0 for static files

Open wesleybl opened this issue 1 year ago • 0 comments

In production mode, Volto returns the header:

Cache-Control: public, max-age=0

On nginx, when it gets max-age=0 it doesn't cache to disk if it's configured to do so. To do this, we would have to use the additional configuration:

proxy_ignore_headers Cache-Control;

I took some time to figure this out. So I ask if it wouldn't be better not to send Cache-Control, leaving the configuration to a proxy.

Anyway, if Volto has to return a max-age, I think it should be something > 0, since they are static resources, which can be in the browser cache.

I think @mamico discussed something about this at: #2216

wesleybl avatar Aug 29 '22 15:08 wesleybl