[🐛 Bug]: Failed to read header in page ...
I am trying to set a response header in the middleware and read it in pages or layout routes. But this isn't working.
I have filed a bug report here - #797
Quick summary in the thread
GitHub
[🐛 Bug]: Failed to read header in page / layout after setting it in...
next-on-pages environment related information System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.5.0: Wed May 1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020 CPU...
1 Reply
Here is a quick summary
1. I set the header in the middleware
Then try reading it in layout.tsx or page.tsx
This works as expected when using a node environment (next dev) but when running on miniflare the headers are null (wrangler pages dev)