|
const isBase64Encoded = isContentTypeBinary(res.headers.get('content-type') || '') |
|
const body = isBase64Encoded ? encodeBase64(await res.arrayBuffer()) : await res.text() |
When I use the hono/lambda-edge adapter with the hono/compress middleware, no response body is returned. This is because the gzipped response isn't being Base64-encoded by the adapter.
The above lines of code should look at the Content-Encoding header to detect a compressed response.
hono/src/adapter/lambda-edge/handler.ts
Lines 140 to 141 in 5149aa4
When I use the
hono/lambda-edgeadapter with thehono/compressmiddleware, no response body is returned. This is because the gzipped response isn't being Base64-encoded by the adapter.The above lines of code should look at the
Content-Encodingheader to detect a compressed response.