two url fixes:

- default scheme for legacy connection params
- set paths for http and websocket APIs
This commit is contained in:
Sam Lewis
2025-01-19 20:58:16 -05:00
parent c27e596dad
commit 56ccdfbdb2
3 changed files with 6 additions and 0 deletions

View File

@@ -51,6 +51,7 @@ func ConnectionFromUri(baseURL *url.URL, authToken string) (*websocket.Conn, con
// Shallow copy the URL to avoid modifying the original
urlWebsockets := *baseURL
urlWebsockets.Path = "/api/websocket"
if baseURL.Scheme == "http" {
urlWebsockets.Scheme = "ws"
}