Enable Cors Origin For amplify App

0

I am invoking Lambda function from amplify app. I wanted to set CORS for my API. Its different from the amplify URL. I have tried to enable Cors in API Gateway level. But It always default to all(*). How to set origin from code or amplify cli?

preguntada hace 6 meses827 visualizaciones
1 Respuesta
0

I have a similar setup and one thing that worked well for me was using Powertools in lambda which makes handling CORS much easier.

You might still need to update settings on in api gateway, but that will depend on how you have configured api gateway. See here: https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors-console.html

respondido hace 6 meses

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