cache-control header being stacked
i want everything to be cached for 5 minutes but static assets (_astro) to be cached for longer but cloudflare is stacking them
_headers
7 Replies
The best solution here is to just remove the cache control header first before setting it. Add a
! Cache-Control line before you set them in _headers@James Hi, I have the same issue here : https://discord.com/channels/595317990191398933/1369650520427593748
I'm not sure how to handle that
Did you also try this?
i don't understand this solution "remove the header first before setting it" 🤷 non clear to me sorry
it's being set on the
/_astro/* rule and then set again on the /* rule. James is saying within the /* rule remove any existing cache-control header first before setting it (so that it doesn't append like you see)tried this, unsetting doesnt seem to work if its reset later
exact same output in the same rule and creating 2 rules