koajs / cors

Cross-Origin Resource Sharing(CORS) for koa
Other
732 stars 82 forks source link

How to resolve socket cors #76

Open yangxyo opened 3 years ago

yangxyo commented 3 years ago

I use koa-socket-2.

'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

3imed-jaberi commented 3 years ago

@yangxyo, koa-socket-2 build on top of socket.io and as you can see here you should pass cors as option to socket.io you can see that here with koa-socket-2.