fix(routing): per-port subdomain falls back to app-name when unset
An empty subdomain previously resolved to the domain apex, which would collide on the root for any unconfigured Traefik port. Treat empty as the app-name default (matching legacy behaviour); apex is reachable only via the explicit @ / root sentinel. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
This commit is contained in:
parent
dec3055b63
commit
149fce835e
@ -38,10 +38,12 @@ tagsProcessorPortSubdomains()
|
||||
|
||||
if [[ "$p_traefik" == "true" ]]; then
|
||||
local host
|
||||
if [[ -z "$p_sub" || "$p_sub" == "@" || "$p_sub" == "root" ]]; then
|
||||
host="${domain_full}" # apex / root of the domain
|
||||
else
|
||||
if [[ "$p_sub" == "@" || "$p_sub" == "root" ]]; then
|
||||
host="${domain_full}" # apex / root of the domain (explicit only)
|
||||
elif [[ -n "$p_sub" ]]; then
|
||||
host="${p_sub}.${domain_full}" # subdomain (single or multi-level)
|
||||
else
|
||||
host="${app_name}.${domain_full}" # no subdomain set -> app-name default
|
||||
fi
|
||||
tagsManagerUpdateUniversalTag "$file" "DOMAINSUBNAME_TAG_${idx}" "$host"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user