var ws = new WebSocket("wss://normal-website.com/chat");
Upgradeheaders in the request and response indicate that this is a WebSocket handshake.
Sec-WebSocket-Versionrequest header specifies the WebSocket protocol version that the client wishes to use. This is typically
Sec-WebSocket-Keyrequest header contains a Base64-encoded random value, which should be randomly generated in each handshake request.
Sec-WebSocket-Acceptresponse header contains a hash of the value submitted in the
Sec-WebSocket-Keyrequest header, concatenated with a specific string defined in the protocol specification. This is done to prevent misleading responses resulting from misconfigured servers or caching proxies.