From 5e304514b6761c23c99818163f0839b9ffea8002 Mon Sep 17 00:00:00 2001 From: deftdawg Date: Wed, 7 Apr 2021 05:07:00 -0400 Subject: [PATCH] Update Snapdrop client to be proxy friendly. Adds location.pathname to the socket location, this is needed to make snapdrop proxiable which allows it to be used as Home Assistant Addon. --- client/scripts/network.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/scripts/network.js b/client/scripts/network.js index 0260bf7..2274343 100644 --- a/client/scripts/network.js +++ b/client/scripts/network.js @@ -58,7 +58,7 @@ class ServerConnection { // hack to detect if deployment or development environment const protocol = location.protocol.startsWith('https') ? 'wss' : 'ws'; const webrtc = window.isRtcSupported ? '/webrtc' : '/fallback'; - const url = protocol + '://' + location.host + '/server' + webrtc; + const url = protocol + '://' + location.host + location.pathname + '/server' + webrtc; return url; }