Skip to content

Commit

Permalink
fix #1653 forward all request headers through single flight
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansolid committed Oct 31, 2024
1 parent 708a7a1 commit aa30192
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/odd-socks-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@solidjs/start": patch
---

forward all request headers through single flight
3 changes: 1 addition & 2 deletions packages/start/src/runtime/server-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,8 @@ async function handleSingleFlight(sourceEvent: FetchEvent, result: any): Promise
new URL(sourceEvent.request.url).origin + import.meta.env.SERVER_BASE_URL
).toString();
}
const cookies = sourceEvent.request.headers.get("cookie");
const event = cloneEvent(sourceEvent) as PageEvent;
event.request = new Request(url, cookies ? { headers: { cookie: cookies } } : undefined);
event.request = new Request(url, { headers: sourceEvent.request.headers });
return await provideRequestEvent(event, async () => {
await createPageEvent(event);
/* @ts-ignore */
Expand Down

0 comments on commit aa30192

Please sign in to comment.