Uncaught DOMException: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS
使用https是出現(xiàn)這個(gè)錯(cuò)誤 嘗試了把ws改成wss報(bào)錯(cuò)沒(méi)有了但還是鏈接不上
//鏈接WorkerMan
ws = new WebSocket('ws://IP:7272/ws');
Mixed Content: The page at 'https://域名' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://ip:7272/ws'. This request has been blocked; this endpoint must be available over WSS.
Uncaught DOMException: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS
workerman 4.1.10