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': '*'} };

Sem respostas

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