Problem description:
Ws connection was initiated under HTTPS, but the connection failed, and the browser reported an error.
Troubleshooting:
The browser does not allow WS protocol for HTTPS connection, only WSS protocol is allowed.
The error message is as follows:
VM71 index. Js: 5 Mixed Content: The page at ‘https://10.67.36.75/main.htm? _=1609838620497’ was loaded over HTTPS, But attempted to connect to the insecure WebSocket endpoint ‘ws://10.67.36.75:24048/’. This request has been blocked; this endpoint must be available over WSS.
Problem solved:
Service (WebSOKCET Server) Added support for WSS.
Other things:
For web (JS), there is no need to overhaul the code, just change the webSocket URL from “WS” to “WSS”… However, the server will need a major overhaul to support the WSS protocol…
After a simple test, it is found that Chrome, 360 security browser, etc., have been forced to use THE WSS protocol for HTTPS connection, ws protocol is not available… It seems the tide is turning…