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.
This commit is contained in:
rcourtman
2025-12-29 14:57:28 +00:00
parent 277aca3e4e
commit 0a20eed07a
+7
View File
@@ -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..."