mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
Support panel hosts that serve the page from their own scheme
Codex serves panels from codex-sandbox:// pages, where origins are opaque: the panel recognizes the app's own addresses by scheme and host, the vessels feed resolves against the document address, and the dev server answers Codex's sandbox origins with CORS.
This commit is contained in:
1 parent
64c1b1951f
commit
b11d54d8b8
5 files changed
+16
-10
No files matched your search
@@ -29,9 +29,9 @@ export function createStandaloneLayerSources() {
|
||||
military: createAdsbLolSource(),
|
||||
vessels: createAisStreamSource({
|
||||
apiUrl: import.meta.env?.VITE_AIS_LIVE_API_URL || '/api/ais-live',
|
||||
// The app's server, also when a panel page loads the app under <base>.
|
||||
origin: () =>
|
||||
new URL(globalThis.document?.baseURI ?? 'http://localhost').origin,
|
||||
// Resolved against the document's address, which a panel host may
|
||||
// serve from its own scheme.
|
||||
origin: () => globalThis.document?.baseURI ?? 'http://localhost',
|
||||
}),
|
||||
cctv: createCctvSource(),
|
||||
radio: createRadioSource(),
|
||||
|
||||
Reference in new issue
Block a user