瀏覽代碼

Merge pull request #288 from deftdawg/master

Make socket location relative to location snapdrop client was served from
RobinLinus 3 年之前
父節點
當前提交
0ba427c37c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      client/scripts/network.js

+ 1 - 1
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;
     }