Fix suffix normalization

This commit is contained in:
Andreas Dueren
2025-11-04 19:11:44 -06:00
parent 55808e9afa
commit 6cf536bc67
4 changed files with 11 additions and 7 deletions

View File

@@ -9,14 +9,14 @@ cloudron build \
--set-build-service builder.docker.due.ren \
--build-service-token e3265de06b1d0e7bb38400539012a8433a74c2c96a17955e \
--set-repository andreasdueren/ente-cloudron \
--tag 0.5.2
--tag 0.5.3
```
## Install
```bash
cloudron install \
--location ente.due.ren \
--image andreasdueren/ente-cloudron:0.5.2
--image andreasdueren/ente-cloudron:0.5.3
```
## After Install

View File

@@ -8,6 +8,10 @@
* Allow httpPort hostnames like `cast.ente`/`accounts.ente` so Cloudron can append the primary domain (`.due.ren`) automatically
## 0.5.3 (2025-11-05)
* Fix regression that could produce duplicated suffixes (e.g. `cast.due.due.ren`) when httpPort hostnames already included the full domain
## 0.5.0 (2025-11-04)
* Proxy Museum GET/HEAD routes (e.g. `/collections`, `/files`, `/remote-store`) so clients that talk to the primary host without `/api` still hit the backend

View File

@@ -7,7 +7,7 @@
"contactEmail": "contact@ente.io",
"website": "https://ente.io",
"tagline": "Open source, end-to-end encrypted photo backup",
"version": "0.5.2",
"version": "0.5.3",
"upstreamVersion": "git-main",
"healthCheckPath": "/health",
"httpPort": 3080,

View File

@@ -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
}