origin

abstract external var origin: String?(source)

Value of the Origin header to send with the opening handshake. Defaults to the http(s) equivalent of the WebSocket URL's origin (e.g. connecting to wss://api.example.com sends Origin: https://api.example.com), so that the connection is treated as same-origin by the server and by SameSite cookie rules.