API Gateway Sockets and CORS

0

As per the title, how does one enable CORS on an API Gateway Socket?

Notoriously, Socket.io, since v3, requires the socket endpoint to have CORS enabled.

I have tried adding headers to the return response in my Lambda (see below), but that does not seem to work.

return { statusCode: 200, body: 'Connected', headers: {'Access-Control-Allow-Origin': '*'} };

preguntada hace 2 años128 visualizaciones
No hay respuestas

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