From a0b029ae260e95e6884c40a6e20986f9b8270328 Mon Sep 17 00:00:00 2001 From: Dorian Date: Wed, 1 Apr 2026 20:43:01 +0100 Subject: [PATCH] fix: always use nginx proxy paths for app iframes Direct port access (http://host:port) fails over Tailscale/VPN and when ports aren't externally accessible. Now all apps use nginx proxy paths (/app/name/) on both HTTP and HTTPS. Also adds missing proxy paths for btcpay, nextcloud, penpot, grafana, indeedhub. Bumps version to 1.3.1. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../src/views/appSession/appSessionConfig.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/neode-ui/src/views/appSession/appSessionConfig.ts b/neode-ui/src/views/appSession/appSessionConfig.ts index 3b6b0a7a..ba9b8c61 100644 --- a/neode-ui/src/views/appSession/appSessionConfig.ts +++ b/neode-ui/src/views/appSession/appSessionConfig.ts @@ -78,6 +78,11 @@ export const HTTPS_PROXY_PATHS: Record = { 'photoprism': '/app/photoprism/', 'endurain': '/app/endurain/', 'dwn': '/app/dwn/', + 'btcpay-server': '/app/btcpay/', + 'nextcloud': '/app/nextcloud/', + 'penpot': '/app/penpot/', + 'grafana': '/app/grafana/', + 'indeedhub': '/app/indeedhub/', } /** External HTTPS apps -- always loaded directly */ @@ -140,16 +145,15 @@ export function resolveAppUrl(id: string, routeQueryPath?: string): string { } } - // HTTPS: use nginx proxy to avoid mixed content - if (window.location.protocol === 'https:') { - const httpsProxy = HTTPS_PROXY_PATHS[id] - if (httpsProxy) return `${window.location.origin}${httpsProxy}` - } + // Always use nginx proxy paths — direct port access fails over Tailscale/VPN + // and when ports aren't exposed externally + const proxyPathEntry = HTTPS_PROXY_PATHS[id] + if (proxyPathEntry) return `${window.location.origin}${proxyPathEntry}` - // HTTP: direct port access (faster, no proxy overhead) + // Fallback: direct port (only for apps without a proxy path) const port = APP_PORTS[id] if (!port) return '' - let base = `http://${window.location.hostname}:${port}` + let base = `${window.location.protocol}//${window.location.hostname}:${port}` if (routeQueryPath) base += routeQueryPath return base }