how to set up X-Content-Type-Options header?

0

i am setting up a REST based api , utilizing api gateway , lambda and a dynamo db . I am assuming as the request/response is handled by my lambda . i can set whatever headers i want in the response in my lambda,but wanted to see if there is anything already built in api gateway to add any headers like X-Content-Type-Options in api gateway?

1 Answer
0

You could look at using a mapping template to override an API's request and response parameters and status codes.

https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-override-request-response-parameters.html

The advantage to doing this header manipulation in the API Gateway is that by doing it there over the Lambda Function it keeps your lambda runtime quicker. Since Lambda is billed by runtime, this can also be more cost effective.

profile pictureAWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions