From d7eb5ef6fed0d462ed1f179ed25caa2b6b415f00 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Mar 2026 11:28:00 +0000 Subject: [PATCH] fix: use PATCH not PUT to update Caddy routes Caddy admin API: PUT creates a key (409 if exists), PATCH replaces it. Since routes always exists after startup from caddy.json, PATCH is correct. --- builder/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/build.sh b/builder/build.sh index 1392d02..44363a6 100755 --- a/builder/build.sh +++ b/builder/build.sh @@ -155,7 +155,7 @@ print(json.dumps(routes)) --write-out "\nHTTP_STATUS:%{http_code}" \ "${CADDY_API}/config/apps/http/servers/hiy/routes" \ --header "Content-Type: application/json" \ - --request PUT \ + --request PATCH \ --data "$UPDATED" 2>&1) set -e if echo "$CADDY_RESP" | grep -q "HTTP_STATUS:2"; then