commit 0ba427c37ccecfe517a3f1ecd1fb3f067832249e
parent 6150a48f29457693ff46655e4394c7597124920b
Author: RobinLinus <RobinLinus@users.noreply.github.com>
Date: Fri, 4 Jun 2021 15:40:21 +0200
Merge pull request #288 from deftdawg/master
Make socket location relative to location snapdrop client was served from
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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;
}