Merge branch 'claude/2'

This commit is contained in:
librelad 2026-05-27 13:24:31 +01:00
commit d1d64d12a9

View File

@ -59,6 +59,7 @@ class RoutingManager {
protocol: parts[4] || 'tcp', protocol: parts[4] || 'tcp',
traefik: isNine ? parts[6] === 'true' : parts[5] === 'true', traefik: isNine ? parts[6] === 'true' : parts[5] === 'true',
webui, webui,
subdomain: isTwelve ? (parts[10] || '') : '',
recommended: isTwelve ? parts[11] === 'true' : webui, recommended: isTwelve ? parts[11] === 'true' : webui,
description: isNine ? (parts[8] || '') : (parts[7] || '') description: isNine ? (parts[8] || '') : (parts[7] || '')
}; };
@ -70,11 +71,14 @@ class RoutingManager {
} }
_previewUrl(port, app) { _previewUrl(port, app) {
const hostName = app && app.config && app.config[`CFG_${port.appSlug.toUpperCase()}_HOST_NAME`];
const domainIdx = app && app.config && app.config[`CFG_${port.appSlug.toUpperCase()}_DOMAIN`]; const domainIdx = app && app.config && app.config[`CFG_${port.appSlug.toUpperCase()}_DOMAIN`];
const domain = app && app.config && app.config[`CFG_DOMAIN_${domainIdx || 1}`]; const domain = app && app.config && app.config[`CFG_DOMAIN_${domainIdx || 1}`];
if (hostName && domain) return `https://${hostName}.${domain}`; const sub = (port.subdomain || '').trim();
return `https://${port.appSlug}.<your-domain>`; const placeholder = '<your-domain>';
const base = domain || placeholder;
if (sub === '@' || sub === 'root') return `https://${base}`;
if (sub) return `https://${sub}.${base}`;
return `https://${port.appSlug}.${base}`;
} }
_render() { _render() {