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
Astro v5.1.1
Node v22.3.0
System macOS (arm64)
Package Manager pnpm
Output server
Adapter @astrojs/cloudflare
Integrations none
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When in development, when returning a 404 response on an Astro page, the Cloudflare context is not available inside middleware.
It works fine when deployed to Cloudflare.
I know this is an adapter issue, but I have experienced similar issues in the past ( #10421 ) and it might be related to how 404 pages ( 404 rewrites? ) are handled internally in Astro.
The repro is not stackblitz because I am not sure if the Cloudflare proxy even works there.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When in development, when returning a 404 response on an Astro page, the Cloudflare context is not available inside middleware.
It works fine when deployed to Cloudflare.
I know this is an adapter issue, but I have experienced similar issues in the past ( #10421 ) and it might be related to how 404 pages ( 404 rewrites? ) are handled internally in Astro.
The repro is not stackblitz because I am not sure if the Cloudflare proxy even works there.
I also created an issue on the adapter repo ( withastro/adapters#492 )
What's the expected result?
The cloudflare context should be available in middleware on 404 pages
Link to Minimal Reproducible Example
https://github.com/TorbjornHoltmon/missing-cloudflare-context-repro
Participation
The text was updated successfully, but these errors were encountered: