@astro.build Is it possible to set up my own worker script similar to Remix `handleRequest()`? I want to set up custom SWR caching, but the only option is the Vite configuration with Cloudflare proxy plugin?
Post
Not as familiar with cloudflare but Astro supports middleware with full access to the request response objects: docs.astro.build/en/guides/mi...
docs.astro.buildMiddlewareLearn how to use middleware in Astro.
It seems that no matter what I do, the middleware throws `Can't modify immutable headers.` while returning a cached response from Cloudflare, not Astro's `await next()`. I'll try to fill the issue.
0 reposts0 likes