websocket address:
ws://118.190.23.192:8081/websocket/weionwall/e26d78da-68d8-475d-8f41-d2bd1c5d4aff/false
If it is new WebSocket('address'), it will succeed.
It’s strange that the connection fails using socket.io JS.
var socket = io.connect('ws://118.190.23.192:8081/websocket/weionwall/e26d78da-68d8-475d-8f41-d2bd1c5d4aff/false')
socket.on('connect', data => {
console.log(data);
})
This is the cdn I use
<script src="//cdn.bootcss.com/socket.io/2.0.3/socket.io.js"></script>
Why are you guys wrong? ?
Cross-domain, right? No 'Access-Control-Allow-Origin' header
Increasing cross-domain support in the http service is actually adding Access-Control-Allow-Origin in the http header