Skip to content

Commit

Permalink
Prefix websocket path with server path
Browse files Browse the repository at this point in the history
Fixes novnc#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)
  • Loading branch information
vsilvar committed Jan 14, 2023
1 parent 5b7d2a6 commit b7ef484
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b7ef484

Please sign in to comment.