Entradas

Habilitar CORS API Gateway AWS

Imagen
Para habilitar los CORS de tu API en API Gateway de AWS desde la consola 1. Ingresa a la consola de AWS. 2. En el servicio de API Gateway selecciona tu API Rest. 3. Dentro del API, selecciona Resources y el recurso que está devolviendo error de CORS 4. Dentro del Recurso, seleccionar la opción de Enable CORS 5. Dentro de las opciones, habilitar los métodos correspondientes para su acceso y permitir todo el origen o determinar los sitios desde donde se permitirá el acceso. Salvar cambios. 6. Actualizar las propiedades de nuestro método OPTIONS desde el CLI de AWS con los siguientes comandos, reemplazando el  API_ID,   RESOURCE_id y  AWS_REGION aws apigateway update-integration --rest-api-id API_ID --resource-id RESOURCE_id --http-method OPTIONS --patch-operations op='replace',path='/contentHandling',value='CONVERT_TO_TEXT' --region AWS_REGION aws apigateway update-integration-response --rest-api-id API_ID --resource-id RESOURCE_id --http-method OPTIONS --status-c...