Skip to content

Commit

Permalink
Do not replace headers on fetch requests with error state
Browse files Browse the repository at this point in the history
  • Loading branch information
aureleoules committed Jan 18, 2025
1 parent 537cd1b commit cf249c0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/kit/src/runtime/server/respond.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,10 +508,9 @@ export async function respond(request, options, manifest, state) {
}

if (state.error && event.isSubRequest) {
request.headers.append('x-sveltekit-error', 'true');
return await fetch(request, {
headers: {
'x-sveltekit-error': 'true'
}
headers: request.headers
});
}

Expand Down

0 comments on commit cf249c0

Please sign in to comment.