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 f847729 commit 4144135Copy full SHA for 4144135
packages/runtime/src/templates/edge-shared/utils.ts
@@ -83,7 +83,10 @@ export const buildResponse = async ({
83
const transformed = response.dataTransforms.reduce((prev, transform) => {
84
return transform(prev)
85
}, props)
86
- return new Response(JSON.stringify(transformed), response)
+ const body = JSON.stringify(transformed)
87
+ const headers = new Headers(response.headers)
88
+ headers.set('content-length', String(body.length))
89
+ return new Response(body, { ...response, headers })
90
}
91
// This var will hold the contents of the script tag
92
let buffer = ''
0 commit comments