snapdrop

A Progressive Web App for local file sharing
git clone http://git.hanabi.in/repos/snapdrop.git
Log | Files | Refs | README | LICENSE

commit 5e304514b6761c23c99818163f0839b9ffea8002
parent fad4632eb903ea6de9ecbec90df0ac6bd7410e68
Author: deftdawg <deftdawg@gmail.com>
Date:   Wed,  7 Apr 2021 05:07:00 -0400

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.
Diffstat:
Mclient/scripts/network.js | 2+-
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; }