diff --git a/.changeset/odd-socks-hug.md b/.changeset/odd-socks-hug.md new file mode 100644 index 000000000..208b04682 --- /dev/null +++ b/.changeset/odd-socks-hug.md @@ -0,0 +1,5 @@ +--- +"@solidjs/start": patch +--- + +forward all request headers through single flight diff --git a/packages/start/src/runtime/server-handler.ts b/packages/start/src/runtime/server-handler.ts index a2c962298..adb5135ab 100644 --- a/packages/start/src/runtime/server-handler.ts +++ b/packages/start/src/runtime/server-handler.ts @@ -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 */