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
전문가
검토됨 21일 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠