You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: better-vnc/for-dogfood/build/Dockerfile
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,4 +10,15 @@ RUN echo "kasm-user ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers.d/nopasswd
10
10
RUN DEBIAN_FRONTEND=noninteractive make-ssl-cert generate-default-snakeoil --force-overwrite
11
11
RUN adduser kasm-user ssl-cert
12
12
13
+
# By default, the kasm web client html page connects to `/websockify` for the websocket connection.
14
+
# This fails for path based apps, as we need to prepend the application path.
15
+
# Replace the line that sets the websocket path to include the application path.
16
+
# Kasm web should only be hosted on the path "/", but just incase it is moved, this regex match
17
+
# will only replace the websocket path if the path is in the format of "/@<username>/<appname>/apps/<appname>/"
18
+
#
19
+
# note: this effect is compiled to some location, so a restart of the container is not enough. The container needs to be
20
+
# rebuilt from scratch (empty volume) to apply.
21
+
RUN sed "s#'websockify'#(window.location.pathname.match(/@[^\\\\/]+\\\\/[^\\\\/]+\\\\/apps\\\\/[^\\\\/]+\\\\//) ?? [''])[0]+'websockify'#g" < $KASM_VNC_PATH/www/dist/main.bundle.js > $KASM_VNC_PATH/www/dist/main.bundle.js.tmp
22
+
RUN mv $KASM_VNC_PATH/www/dist/main.bundle.js.tmp $KASM_VNC_PATH/www/dist/main.bundle.js
0 commit comments