Prefix websocket path with server path

Fixes #1737 and it should work for all of the different scenarios where the relative assets also work.
This includes, for example:
   - /
   - /vnc.html
   - /vnc/
   - /vnc/vnc.html

It won't work for:
 - /vnc (but the assets don't work either, so it's consistent)
 - or /vnc.html/ (but this results in a 404 by default anyway)
This commit is contained in:
Vitor Rodrigues 2023-01-14 14:48:51 +01:00 committed by GitHub
parent 5b7d2a622e
commit b7ef484fbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -180,7 +180,7 @@ const UI = {
UI.initSetting('shared', true);
UI.initSetting('view_only', false);
UI.initSetting('show_dot', false);
UI.initSetting('path', 'websockify');
UI.initSetting('path', window.location.pathname.substr(1) + '/../websockify');
UI.initSetting('repeaterID', '');
UI.initSetting('reconnect', false);
UI.initSetting('reconnect_delay', 5000);