Skip to content

Commit

Permalink
Fix context-path in track url
Browse files Browse the repository at this point in the history
  • Loading branch information
LEDfan committed Apr 29, 2024
1 parent eada5a5 commit 54b6db3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/resources/static/js/shiny.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Shiny.app = {
names: null,
ids: null
},
appPath: null,
appPath: null, // guaranteed to start with /
containerSubPath: null,
wasAutomaticReloaded: false
},
Expand All @@ -73,7 +73,7 @@ Shiny.app = {
websocketConnections: [],
lastHeartbeatTime: null,
appStopped: false,
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 /
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 /
baseFrameUrl: null, // the base url of the app iframe (i.e. without any subpath, query parameters, hash location etc.); guaranteed to end with /
},

Expand Down Expand Up @@ -131,7 +131,7 @@ Shiny.app = {
Shiny.connections.startHeartBeats();

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

0 comments on commit 54b6db3

Please sign in to comment.