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 年前檢視次數 446 次
1 個回答
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
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南