You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@predaytor I need to confirm with the Cloudflare Team first, before I can give you an answer, but I'm not sure if Worker Assets support the _headers file in the same level as Pages do.
Yes, currently Workers + Assets does not read any of _headers, _redirects nor _routes.json.
The basic configuration of Workers + Assets appears to avoid the need for _routes.json in almost every case so far.
We are deciding what to do about the other two. Both can be handled in different ways with Workers.
For example it should be possible to setup Cloudflare Snippets in front of a Workers + Assets worker that can do things like redirects and modifying headers based on requests.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Using the experimental deployment of Cloudflare Workers for Astro, caching does not seem to work for paths specified in
_headers
.Response headers for static assets:
cache-control: public, max-age=0, must-revalidate
.https://my-astro-app.thepredaytor.workers.dev/
public/_routes.json
:public/_headers
:/_astro/* Cache-Control: public, max-age=31557600, immutable /favicon.ico Cache-Control: public, max-age=3600, immutable /favicon.svg Cache-Control: public, max-age=3600, immutable
wrangler.toml
:What's the expected result?
The response headers must represent those defined in the
_headers
file.Link to Minimal Reproducible Example
https://stackblitz.com/github/predaytor/astro-cloudflare
Participation
The text was updated successfully, but these errors were encountered: