From 0a20eed07a1272be1480a09a527f3cd2ca581758 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Mon, 29 Dec 2025 14:57:28 +0000 Subject: [PATCH] fix: Normalize URL to prevent double-slash in agent download. Related to #956 Strip trailing slashes from PULSE_URL to prevent URLs like http://host:7655//download/pulse-agent which incorrectly match the frontend route instead of the download endpoint. --- scripts/install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/install.sh b/scripts/install.sh index f4005cc10..f89c32b28 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -227,6 +227,13 @@ while [[ $# -gt 0 ]]; do esac done +# --- URL Normalization --- +# Strip trailing slashes from PULSE_URL to prevent double-slash URLs +# (e.g., http://host:7655//download/... which would match frontend routes) +if [[ -n "$PULSE_URL" ]]; then + PULSE_URL="${PULSE_URL%/}" +fi + # --- Platform Auto-Detection --- # Only auto-detect if flags weren't explicitly set log_info "Detecting available platforms..."