eggjs / egg

🥚 Born to build better enterprise frameworks and apps with Node.js & Koa
https://eggjs.org
MIT License
18.9k stars 1.82k forks source link

egg-soket.io跨域 #4800

Closed male110 closed 2 years ago

male110 commented 2 years ago

Access to XMLHttpRequest at 'http://127.0.0.1:7001/socket.io/?EIO=4&transport=polling&t=Nqi-mDi' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

不知道这个egg-socket.io怎么设置,我http接口正常的,已经开启了egg-cors

male110 commented 2 years ago

版本问题,client换成2。xx就可以了