# fix\(web\): use wss:// when page is served over HTTPS \(\#391\) · screen/t3code-personal

[View on GitCafe](https://git.cafe/screen/t3code-personal/commit/6271b989bc72a255483aa96ccb2868ef4655341d)

Repository: [screen/t3code-personal](https://git.cafe/screen/t3code-personal)

Visibility: public

Requested revision: 6271b989bc72a255483aa96ccb2868ef4655341d

Requested commit: 6271b989bc72a255483aa96ccb2868ef4655341d

Commit: 6271b989bc72a255483aa96ccb2868ef4655341d

Tree: a00e0977aca59ebff770a4c74ec04ec1f55ec5cb

Author: Patrick Bauer

Committer: GitHub

## Message

```
fix(web): use wss:// when page is served over HTTPS (#391)

When T3 Code web mode is accessed via HTTPS (e.g. through a reverse proxy
or Tailscale Serve), the WebSocket connection must use wss:// instead of
ws://. Browsers block mixed content — an insecure ws:// connection
initiated from an HTTPS page.

Fix: derive the WebSocket protocol from window.location.protocol.

Co-authored-by: PatrickBauer <patrick@patrickbauer.dev>
```

## Parents

- [57aa6bf16cd0dcfbe9037a5ca29ad61bdd2a857e](https://git.cafe/screen/t3code-personal/commit/57aa6bf16cd0dcfbe9037a5ca29ad61bdd2a857e?format=markdown)

[Source at this commit](https://git.cafe/screen/t3code-personal/tree/6271b989bc72a255483aa96ccb2868ef4655341d?format=markdown)
