This repository has no description
1import type { Handle } from '@sveltejs/kit';
2
3export const handle: Handle = async ({ event, resolve }) => {
4 return resolve(event, {
5 // sveltekit blocks atcute fetch handler from reading headers
6 // because it assumes backend APIs might return sensitive headers.
7 // this happens when during CSR we run a fetch that was the same
8 // as one ran during SSR, so sveltekit tries to give that fetch
9 // the data we already had.
10 // so we allow these headers to have atcute function properly.
11 filterSerializedResponseHeaders(name) {
12 return name === 'content-type' || name === 'content-length';
13 }
14 });
15};