From 2b126ee4e6c9c81ac9dad882f6e7a3a0af8aa5ad Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 12 Aug 2026 23:32:14 +0200 Subject: [PATCH] Fix deploy asset check to use forwarded HTTPS headers. Curling localhost without X-Forwarded-Proto always yields http:// URLs even when trustProxies is correct behind Caddy. --- scripts/deploy-production.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/deploy-production.sh b/scripts/deploy-production.sh index 5363b3c..16262f6 100755 --- a/scripts/deploy-production.sh +++ b/scripts/deploy-production.sh @@ -94,7 +94,23 @@ for dir in "${DIRS[@]}"; do exit 1 fi - asset_scheme="$(curl -fsS "${health_url%/up}/login" | grep -oE 'https?://[^"'\'' ]+\.css' | head -1 || true)" + # Hit /login as the public HTTPS edge would (trustProxies needs forwarded proto). + app_url="$(awk -F= '/^APP_URL=/ {print $2; exit}' .env 2>/dev/null || true)" + app_url="${app_url:-https://transcribe.z00.nu}" + public_host="$(python3 - <&2 exit 1