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

已提问 2 年前128 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则