From 720e23b771a2a0b4d8dd0e9f852cb3a2e15d491b Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Wed, 11 Mar 2026 11:46:06 +0100 Subject: [PATCH] fix: avoid double https:// in webmention sender endpoint construction --- start.example.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/start.example.sh b/start.example.sh index ca450de2..a08cf2a4 100644 --- a/start.example.sh +++ b/start.example.sh @@ -118,6 +118,7 @@ start_webmention_poller() { return fi + WEBMENTION_SENDER_HOST="${WEBMENTION_SENDER_HOST:-127.0.0.1}" WEBMENTION_SENDER_PORT="${WEBMENTION_SENDER_PORT:-${PORT:-3000}}" WEBMENTION_SENDER_PATH="${WEBMENTION_SENDER_MOUNT_PATH:-/webmention-sender}" @@ -145,7 +146,11 @@ start_webmention_poller() { return fi - WEBMENTION_SENDER_ENDPOINT="${WEBMENTION_SENDER_ENDPOINT:-http://${WEBMENTION_SENDER_HOST}:${WEBMENTION_SENDER_PORT}${WEBMENTION_SENDER_PATH}}" + # If host includes protocol (http/https), use as-is, else prepend http:// + case "$WEBMENTION_SENDER_HOST" in + http*://*) WEBMENTION_SENDER_ENDPOINT="${WEBMENTION_SENDER_HOST}${WEBMENTION_SENDER_PATH}" ;; + *) WEBMENTION_SENDER_ENDPOINT="http://${WEBMENTION_SENDER_HOST}:${WEBMENTION_SENDER_PORT}${WEBMENTION_SENDER_PATH}" ;; + esac # Wait for the local endpoint to answer (any HTTP status) before polling. WEBMENTION_READY_ELAPSED=0