소스 검색

Merge pull request #1 from deftdawg/deftdawg-location-pathname-homeassistant

Update Snapdrop client to be proxy friendly.
deftdawg 4 년 전
부모
커밋
95921ee723
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;
     }