We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95f7de5 commit 777d0cbCopy full SHA for 777d0cb
packages/kit/test/apps/basics/src/hooks.server.js
@@ -57,7 +57,7 @@ export const handle = sequence(
57
return resolve(event);
58
},
59
({ event, resolve }) => {
60
- if (event.request.headers.has('user-agent') === !!event.isSyntheticRequest) {
+ if (!!event.request.headers.get('x-this-is-a-synthetic-request') !== event.isSyntheticRequest) {
61
throw new Error('Synthetic requests should have isSyntheticRequest set to true');
62
}
63
@@ -138,5 +138,7 @@ export async function handleFetch({ request, fetch }) {
138
);
139
140
141
+ request.headers.set('x-this-is-a-synthetic-request', 'true');
142
+
143
return fetch(request);
144
0 commit comments