solid-start
solid-start copied to clipboard
[Bug?]: Empty `Headers` object when preloading after form submission
Duplicates
- [X] I have searched the existing issues
Latest version
- [X] I have tested the latest version
Current behavior 😯
Get an empty headers object.
Expected behavior 🤔
Access to all the headers the browser sent.
Steps to reproduce 🕹
https://github.com/samualtnorman/solid-start-bug/tree/no-headers
Steps:
- Clone
[email protected]:samualtnorman/solid-start-bug.git - Switch to the
no-headersbranch - Run
pnpm dev - Visit http://localhost:3000/
- Click the button
- You should notice that the server logs an empty
Headersobject - If you refresh the page, a not empty headers object will be logged
- You should notice that the server logs an empty
Context 🔦
I'm trying to access the headers and make decisions based on that e.g. cookies.
Your environment 🌎
System:
OS: NixOS 24.05.5744.dc2e0028d274 (Uakari) x86_64
CPU: 12th Gen Intel(R) Core(TM) i5-12500 (12) @ 4.60 GHz
Binaries:
Node: 22.9.0
PNPM: 9.12.2
npmPackages:
@solidjs/meta 0.29.4
@solidjs/router 0.14.7
@solidjs/start 1.0.8
solid-js 1.9.1
vinxi: 0.4.3