gzip compression with Lambda function URL?

0

Hi

Is there a way to enable gzip compression with the lambda function url, I have set the following in the actual function code but it doesnt seem to work? let response = { statusCode: 200, headers: { 'Access-Control-Allow-Headers': 'Content-Type', 'Access-Control-Allow-Origin': '*', 'Accept-Encoding': 'gzip' }, body: JSON.stringify(responseBody) };

1回答
0

What are you trying to do? Send compressed content to the function or receive compressed content from the function? In either case, the content is binary, so it will be base64 encoded.

If you want to return from the function to the client, you need to compress the body yourself, encode it using base64, and set the content-type appropriately.

profile pictureAWS
エキスパート
Uri
回答済み 2年前
profile picture
エキスパート
レビュー済み 22日前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ