Fix suffix normalization
This commit is contained in:
8
start.sh
8
start.sh
@@ -110,13 +110,13 @@ FAMILY_HOST="$(resolve_http_hostname "FAMILY_DOMAIN" "family.${APP_FQDN}")"
|
||||
|
||||
normalize_host() {
|
||||
local host="$1"
|
||||
# Replace trailing shared domain with the app domain if present (allows values like cast.ente)
|
||||
local suffix=".${APP_FQDN#*.}"
|
||||
case "$host" in
|
||||
*".${APP_FQDN#*.}")
|
||||
printf '%s\n' "${host%.*}.${APP_FQDN#*.}"
|
||||
*"$suffix")
|
||||
printf '%s\n' "$host"
|
||||
;;
|
||||
*)
|
||||
printf '%s\n' "$host"
|
||||
printf '%s%s\n' "$host" "$suffix"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user