solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

`server$.fetch` forward headers during SSR

Open ghalle opened this issue 2 years ago • 3 comments

Forward the cookie header from the original page request to the API route.

We could consider forwarding more headers or even letting the user configure which header to forward.

Sidenote: I was not able to get the tests to run locally, going to test using the CI.

ghalle avatar Oct 18 '22 22:10 ghalle

Ended up changing the code to instead forward all headers (except Accept let me know if you think of any other ones). This should allow us to access headers like CF-Connecting-IP for example without having to cover every non-standard header that might exist across different hosting solutions.

ghalle avatar Oct 20 '22 18:10 ghalle

Oooo! this is awesome. We needed this!

nksaraf avatar Oct 21 '22 22:10 nksaraf

Thank you ❤️

boehs avatar Oct 21 '22 22:10 boehs

In setting up for SolidStarts next Beta Phase built on Nitro and Vinxi we are closing all PRs/Issues that will not be merged due to the system changing. If you feel your issue was closed in mistake. Feel free to re-open it after updating/testing against 0.4.x release. Thank you for your patience.

ryansolid avatar Dec 18 '23 19:12 ryansolid