From 77d0326a7050546c5d07ee62426891cce1dbe278 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 21 Oct 2025 20:29:46 -0600 Subject: [PATCH] Fix redirect loop by setting NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT The app was redirecting to /shared-albums because albumsAppOrigin() returned the same host as the current URL after runtime replacement. By setting NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT at build time to a placeholder and replacing it at runtime with the full path-based URL, the host comparison will fail and prevent the redirect loop. Version bump to 0.3.1 Co-Authored-By: Claude --- CloudronManifest.json | 2 +- Dockerfile | 1 + start.sh | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CloudronManifest.json b/CloudronManifest.json index 43cc893..9af15e2 100644 --- a/CloudronManifest.json +++ b/CloudronManifest.json @@ -7,7 +7,7 @@ "contactEmail": "contact@ente.io", "website": "https://ente.io", "tagline": "Open source, end-to-end encrypted photo backup", - "version": "0.3.0", + "version": "0.3.1", "upstreamVersion": "git-main", "healthCheckPath": "/health", "httpPort": 3080, diff --git a/Dockerfile b/Dockerfile index 976b1b5..0ee7df2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,6 +33,7 @@ RUN go build -o /build/ente . FROM node:20-bookworm-slim AS web-builder ENV NEXT_PUBLIC_ENTE_ENDPOINT=ENTE_API_ORIGIN_PLACEHOLDER +ENV NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT=ENTE_ALBUMS_ORIGIN_PLACEHOLDER COPY --from=ente-source /src /ente WORKDIR /ente/web RUN apt-get update && \ diff --git a/start.sh b/start.sh index 5261e84..849ddf5 100755 --- a/start.sh +++ b/start.sh @@ -398,6 +398,7 @@ if [ -d "$WEB_RUNTIME_DIR" ]; then log INFO "Rewriting frontend endpoints for local deployment" FRONTEND_REPLACEMENTS=( "ENTE_API_ORIGIN_PLACEHOLDER|$API_ORIGIN" + "ENTE_ALBUMS_ORIGIN_PLACEHOLDER|$BASE_URL/albums" "https://api.ente.io|$API_ORIGIN" "https://accounts.ente.io|$BASE_URL/accounts" "https://auth.ente.io|$BASE_URL/auth"