Skip to content

Commit

Permalink
Return pass through the query string and hash
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke committed Nov 30, 2023
1 parent 7c08452 commit d84f19d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Components/Viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ function setupAppProxyPath(proxy: PyodideProxy | WebRProxy): {
} {
const appName = `app_${utils.makeRandomKey(20)}`;
const urlPath = appName + "/";
// Pass through any query string or hash in the outer URL to the iframe url.
const srcPath = urlPath + window.location.search + window.location.hash;

if (!navigator.serviceWorker.controller) {
throw new Error("ServiceWorker controller was not found!");
Expand All @@ -49,7 +51,7 @@ function setupAppProxyPath(proxy: PyodideProxy | WebRProxy): {
}
});

return { appName, urlPath };
return { appName, urlPath: srcPath };
}

// Register the app path with the service worker
Expand Down

0 comments on commit d84f19d

Please sign in to comment.