diff --git a/scripts/smoke.sh b/scripts/smoke.sh index 8f6d911..6be90d1 100755 --- a/scripts/smoke.sh +++ b/scripts/smoke.sh @@ -56,6 +56,13 @@ HTTP=$(curl -sS -o /dev/null -w '%{http_code}' "$BASE/portal/") check_status "GET /portal/ serves the Angular app" "200" "$HTTP" HTTP=$(curl -sS -o /dev/null -w '%{http_code}' "$BASE/portal/legacy/1001") check_status "deep link /portal/legacy/1001 falls back to index.html" "200" "$HTTP" +# Regression check: nginx's implicit redirect construction uses its own +# internal `listen` port, not the host's published port - a naive +# `return 301 /portal/` silently drops :8080 from the Location header. +BARE_REDIRECT_STATUS=$(curl -sS -o /dev/null -w '%{http_code}' "$BASE/portal") +check_status "GET /portal (no slash) redirects" "301" "$BARE_REDIRECT_STATUS" +FOLLOWED=$(curl -sSL -o /dev/null -w '%{http_code}' "$BASE/portal") +check_status "following that redirect lands on a 200, on the same host:port" "200" "$FOLLOWED" echo "== Seam A: unified read =="