Skip to content

Commit

Permalink
[fix] remove hack breaking 'fetch' with Undici / CF Wrangler (#5109) (#…
Browse files Browse the repository at this point in the history
…5116)

* [fix] remove hack breaking 'fetch' with Undici / CF Wrangler (#5109)

* Create perfect-kiwis-sneeze.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>
  • Loading branch information
OttoHatt and Rich-Harris authored May 30, 2022
1 parent 7d5fb30 commit 03deb13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/perfect-kiwis-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sveltejs/kit": patch
---

[fix] don't set `credentials` to `undefined` in server-side `fetch`
5 changes: 1 addition & 4 deletions packages/kit/src/runtime/server/page/load_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,7 @@ export async function load_node({
}

response = await respond(
// we set `credentials` to `undefined` to workaround a bug in Cloudflare
// (https://github.com/sveltejs/kit/issues/3728) — which is fine, because
// we only need the headers
new Request(new URL(requested, event.url).href, { ...opts, credentials: undefined }),
new Request(new URL(requested, event.url).href, { ...opts }),
options,
{
...state,
Expand Down

0 comments on commit 03deb13

Please sign in to comment.