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 fce483e commit e50df01Copy full SHA for e50df01
1 file changed
src/adapter/lambda-edge/handler.ts
@@ -168,7 +168,10 @@ const createRequest = (event: CloudFrontEdgeEvent): Request => {
168
169
let body: string | Uint8Array<ArrayBuffer> | undefined = rawBody
170
if (rawBody !== undefined) {
171
- const bytes = typeof rawBody === 'string' ? new TextEncoder().encode(rawBody) : rawBody
+ const bytes =
172
+ typeof rawBody === 'string'
173
+ ? (new TextEncoder().encode(rawBody) as Uint8Array<ArrayBuffer>)
174
+ : rawBody
175
body = bytes
176
headers.set('content-length', bytes.length.toString())
177
}
0 commit comments