From 6fbd00bddfbf869ab7a207c053dcc74f8a3dbc82 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Mon, 11 Apr 2016 00:12:19 +0000 Subject: [PATCH] Use wss:// when we're connected over https://. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3198 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- core/client.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/client.js b/core/client.js index 5e2f66e7..21395088 100644 --- a/core/client.js +++ b/core/client.js @@ -423,7 +423,8 @@ $(document).ready(function() { window.addEventListener("message", onMessage, false); enableDragDrop(); - gSocket = new WebSocket("ws://" + gSocket = new WebSocket( + (window.location.protocol == "https:" ? "wss://" : "ws://") + window.location.hostname + (window.location.port.length ? ":" + window.location.port : "") + "/terminal/socket");