mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
Let the app run under a panel page's document base
A panel page loads the app with <base> pointing at the app's server, so addresses the app builds resolve against the document base instead of the page location, and hash updates stay on the page's own address. The dev server answers panel origins with CORS on the API routes too.
This commit is contained in:
1 parent
63341b947e
commit
d9ecd126c8
10 files changed
+96
-11
No files matched your search
+7
-1
@@ -529,7 +529,13 @@ export class ShareLinkManager {
|
||||
if (this._destroyed || this._initialRestorePending) return;
|
||||
const params = this._buildHashParams();
|
||||
if (!params) return;
|
||||
history.replaceState(null, '', `#${params.toString()}`);
|
||||
// The hash belongs to this page's address, not the document base the
|
||||
// app may load under.
|
||||
history.replaceState(
|
||||
null,
|
||||
'',
|
||||
new URL(`#${params.toString()}`, window.location.href).href,
|
||||
);
|
||||
}
|
||||
|
||||
/** Build a deterministic snapshot without mutating history. */
|
||||
|
||||
Reference in new issue
Block a user