How to remove default response headers?


#1

Hello,

Amazing framework, works beautifully on AWS :slight_smile:

I wanted to ask, is it possible to remove the response headers inserted by Jets?
These include: ‘x-jets-base64’, ‘x-jets-call-count’, ‘x-jets-prewarm-count’ and ‘x-runtime’.

Also, is it possible to remove the AWS headers as well? E.g. ‘x-amz-apigw-id’, ‘x-amzn-requestid’, and ‘x-amzn-trace-id’.

Thanks!


#2

Not possible to remove the x-jets-* headers.

RE: x-amz-* headers

Unsure if they are removable. In case it helps, Jets uses Lambda Proxy, which passes the headers straight through. And APIGW adds those headers.

If CloudFront in is front on API Gateway. A Lambda@Edge function could allow you to change the headers.