Skip to content

Commit 41284ed

Browse files
kazunori279tommywagz
authored andcommitted
fix: add support for wss:// and HTTPS (#816)
1 parent c9b9428 commit 41284ed

File tree

1 file changed

+3
-1
lines changed
  • python/agents/bidi-demo/app/static/js

1 file changed

+3
-1
lines changed

python/agents/bidi-demo/app/static/js/app.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ enableAffectiveDialogCheckbox.addEventListener("change", handleRunConfigChange);
3535

3636
// Build WebSocket URL with RunConfig options as query parameters
3737
function getWebSocketUrl() {
38-
const baseUrl = "ws://" + window.location.host + "/ws/" + userId + "/" + sessionId;
38+
// Use wss:// for HTTPS pages, ws:// for HTTP (localhost development)
39+
const wsProtocol = window.location.protocol === "https:" ? "wss:" : "ws:";
40+
const baseUrl = wsProtocol + "//" + window.location.host + "/ws/" + userId + "/" + sessionId;
3941
const params = new URLSearchParams();
4042

4143
// Add proactivity option if checked

0 commit comments

Comments
 (0)