I use socket.io 2.1.1 in my mean-stack website by AngularJS.
The website works well when we call it by IP: https://47.52.108.146/1/#/edit/
Then, I added a CDN (https://www-source.qiniu.com/en) on top of it. However, the console of https://www.funfun.ink/1/#/edit/ repeatedly showed errors:
GET https://www.funfun.ink/pathSocketIO/?EIO=3&transport=polling&t=MHOgXNw&sid=CIzEAy8ZnhMciGuOAAAf 400 ()
POST https://www.funfun.ink/pathSocketIO/?EIO=3&transport=polling&t=MHOgcU6&sid=CIzEAy8ZnhMciGuOAAAf 400 ()
WebSocket connection to 'wss://www.funfun.ink/pathSocketIO/?EIO=3&transport=websocket&sid=4Z1-Nc7ElaAA22X9AAAg' failed: Error during WebSocket handshake: Unexpected response code: 400
I tried to add a rule in the CDN to not cache anything in /pathSocketIO
, but it did not help.
Does anyone know how to fix this?