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

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions