Skip to content

Commit 54b6db3

Browse files
committed
Fix context-path in track url
1 parent eada5a5 commit 54b6db3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/resources/static/js/shiny.app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Shiny.app = {
5353
names: null,
5454
ids: null
5555
},
56-
appPath: null,
56+
appPath: null, // guaranteed to start with /
5757
containerSubPath: null,
5858
wasAutomaticReloaded: false
5959
},
@@ -73,7 +73,7 @@ Shiny.app = {
7373
websocketConnections: [],
7474
lastHeartbeatTime: null,
7575
appStopped: false,
76-
parentFrameUrl: null, // the current url of the shinyproxy page, i.e. the location of the browser (e.g. http://localhost:8080/app/01_hello); guaranteed to end with /
76+
parentFrameUrl: null, // the current url of the shinyproxy page, i.e. the location of the browser (e.g. http://localhost:8080/app/01_hello/); guaranteed to end with /
7777
baseFrameUrl: null, // the base url of the app iframe (i.e. without any subpath, query parameters, hash location etc.); guaranteed to end with /
7878
},
7979

@@ -131,7 +131,7 @@ Shiny.app = {
131131
Shiny.connections.startHeartBeats();
132132

133133
const baseURL = new URL(Shiny.common.staticState.contextPath, window.location.origin);
134-
let parentUrl = new URL(Shiny.app.staticState.appPath, baseURL).toString();
134+
let parentUrl = new URL(Shiny.app.staticState.appPath.substring(1), baseURL).toString();
135135
if (!parentUrl.endsWith("/")) {
136136
parentUrl = parentUrl + "/";
137137
}

0 commit comments

Comments
 (0)