fix(demo): IndeeHub opens its real site — the same-origin proxy broke its assets
The nginx sub_filter rewrite couldn't touch the SPA's runtime-built asset URLs, so the iframed IndeeHub rendered with broken links and images. The real site refuses iframing (X-Frame-Options), so the demo now opens https://indee.tx1138.com/ directly via the demo-external mechanism, whose isDemoExternal() check was previously hardcoded off. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
3aebbcbbb8
commit
8e13f981d0
@@ -26,13 +26,17 @@ export function clearDemoIntroSeen(): void {
|
||||
// Only these apps actually do something in the demo (a mock UI or a real
|
||||
// external site). Everything else shows "No demo" on a disabled install button
|
||||
// and is not launchable.
|
||||
const DEMO_EXTERNAL_URLS: Record<string, string> = {}
|
||||
// IndeeHub's real site sends X-Frame-Options: SAMEORIGIN, and the old
|
||||
// same-origin nginx sub_filter proxy broke its runtime-built asset URLs —
|
||||
// so the demo opens the real site directly instead.
|
||||
const DEMO_EXTERNAL_URLS: Record<string, string> = {
|
||||
indeedhub: 'https://indee.tx1138.com/',
|
||||
}
|
||||
|
||||
// Apps loaded in the in-app iframe via a same-origin path. IndeeHub and Mempool
|
||||
// are reverse-proxied by nginx (X-Frame-Options/CSP stripped + asset paths
|
||||
// rewritten) so the frame-busting real sites can be embedded.
|
||||
const DEMO_MOCK_UI: Record<string, string> = {
|
||||
indeedhub: '/app/indeedhub/',
|
||||
mempool: '/app/mempool/',
|
||||
'mempool-web': '/app/mempool/',
|
||||
'bitcoin-knots': '/app/bitcoin-knots/',
|
||||
@@ -61,11 +65,11 @@ const DEMO_MOCK_UI: Record<string, string> = {
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether a demo app opens in a new tab. Nothing does — IndeeHub and Mempool
|
||||
* both load their real site directly in the in-app iframe.
|
||||
* Whether a demo app opens externally (new tab / in-app browser) because its
|
||||
* real site blocks iframing (X-Frame-Options).
|
||||
*/
|
||||
export function isDemoExternal(_appId: string): boolean {
|
||||
return false
|
||||
export function isDemoExternal(appId: string): boolean {
|
||||
return appId in DEMO_EXTERNAL_URLS
|
||||
}
|
||||
|
||||
/** Can this app be launched/installed in the demo? */
|
||||
|
||||
Reference in New Issue
Block a user