fix: use proxy paths for filebrowser URLs to avoid mixed content on HTTPS

Mock backend lan-address now uses localhost so hostname replacement works
correctly. CloudFolder external URLs use origin-relative proxy paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dorian 2026-03-09 18:49:20 +00:00
parent e7b1a772b7
commit 4bc0c4b483
2 changed files with 8 additions and 8 deletions

View File

@ -587,7 +587,7 @@ const mockData = {
'backup-progress': null,
'update-progress': null,
},
'lan-address': '192.168.1.100',
'lan-address': 'localhost',
'tor-address': 'archydemox7k3pnw4hv5qz2jcbr6dwefys3ockqzf4mzjlvxot2ioad.onion',
unread: 3,
'wifi-ssids': ['Home-5G', 'Archipelago-Mesh', 'Neighbors-Open'],
@ -640,7 +640,7 @@ function staticApp({ id, title, version, shortDesc, longDesc, license, state, la
'interface-addresses': {
main: {
'tor-address': torHost ? `${torHost}.onion` : `${id}.onion`,
'lan-address': lanPort ? `http://192.168.1.100:${lanPort}` : '',
'lan-address': lanPort ? `http://localhost:${lanPort}` : '',
},
},
status: state,

View File

@ -229,8 +229,8 @@ const sections: Record<string, () => ContentSection> = {
iconPaths: ['M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z'],
iconBg: 'bg-blue-500/15',
iconColor: 'text-blue-400',
iframeUrl: `http://${host.value}:2283/photos`,
externalUrl: `http://${host.value}:8083`,
iframeUrl: `${origin.value}/app/immich/photos`,
externalUrl: `${origin.value}/app/filebrowser/`,
nativeUI: true,
initialPath: '/Photos',
}),
@ -243,7 +243,7 @@ const sections: Record<string, () => ContentSection> = {
iconBg: 'bg-orange-500/15',
iconColor: 'text-orange-400',
iframeUrl: `${origin.value}/app/nextcloud/apps/files/?dir=/Songs`,
externalUrl: `http://${host.value}:8083`,
externalUrl: `${origin.value}/app/filebrowser/`,
nativeUI: true,
initialPath: '/Music',
}),
@ -256,7 +256,7 @@ const sections: Record<string, () => ContentSection> = {
iconBg: 'bg-green-500/15',
iconColor: 'text-green-400',
iframeUrl: `${origin.value}/app/nextcloud/apps/files/?dir=/Documents`,
externalUrl: `http://${host.value}:8083`,
externalUrl: `${origin.value}/app/filebrowser/`,
nativeUI: true,
initialPath: '/Documents',
}),
@ -268,8 +268,8 @@ const sections: Record<string, () => ContentSection> = {
iconPaths: ['M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z'],
iconBg: 'bg-white/10',
iconColor: 'text-white/70',
iframeUrl: `http://${host.value}:8083`,
externalUrl: `http://${host.value}:8083`,
iframeUrl: `${origin.value}/app/filebrowser/`,
externalUrl: `${origin.value}/app/filebrowser/`,
nativeUI: true,
initialPath: '/',
}),