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 Resposta
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
respondido há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas