Skip to content

Commit f990500

Browse files
authored
Use a secure websocket scheme if server is https (#558)
1 parent aa0bf3a commit f990500

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/murfey/client/websocket.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ def __init__(
2727
websocket.enableTrace(True)
2828

2929
# Parse server URL and get proxy path used, if any
30-
url = urllib.parse.urlparse(server)._replace(scheme="ws")
30+
url = urllib.parse.urlparse(server)._replace(
31+
scheme="wss" if server.startswith("https") else "ws"
32+
)
3133
proxy_path = url.path.rstrip("/")
3234

3335
self._address = url.geturl()

0 commit comments

Comments
 (0)