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?

preguntada hace un año447 visualizaciones
1 Respuesta
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 hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas