For Workes & Pages, what is the name of the domain?
tatarintsev (dot) photography
What is the issue or error you’re encountering
I’ve migrated my pages static website to workers + static asset beta feature. Bunch of assets of that static site are immutable, however, I can’t seem to configure caching header for them: Cache-Control header is always public, max-age=0, must-revalidate.
What steps have you taken to resolve the issue?
Set up caching rules in Website settings that matches on static assets and overrides browser TTL to 1 year.
Put _headers file into assets directory with Cache-Control values I want
What are the steps to reproduce the issue?
Run curl -svo /dev/null https://tatarintsev.photography/blurhash-worker.37aaa842adffbc17.js
I was facing the same issue, a solution for now is to create a Transform Rule: Create an HTTP response header modification rule in the dashboard
you have to define an expression to target the files, like for example (ends_with(http.request.uri.path, "css"))
and then modify response header: set a static Header Cache-Control to public, max-age=31536000, immutable
As far as I can tell, this is still happening. Thanks to the advice in this thread I created an HTTP Response Header Modification Rule and that worked. I have my local _headers file mirroring what I configured there, just in case it should start working correctly. It’s odd as it says that it’s uploading _headers to the Static Assets but then it seems to just not doing anything with it? Oh well. Will continue to watch this thread for updates.