From e57bf3bbcf9235b2cc0b74eff0e8ee0f9fb1ecbf Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Fri, 21 Jul 2023 16:56:01 +0200 Subject: [PATCH] servercow: fix regression (#1964) --- providers/dns/servercow/internal/client.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/providers/dns/servercow/internal/client.go b/providers/dns/servercow/internal/client.go index 8f03d9a9..3695b097 100644 --- a/providers/dns/servercow/internal/client.go +++ b/providers/dns/servercow/internal/client.go @@ -149,9 +149,8 @@ func newJSONRequest(ctx context.Context, method string, endpoint *url.URL, paylo req.Header.Set("Accept", "application/json") - if payload != nil { - req.Header.Set("Content-Type", "application/json") - } + // Content-Type should be added even if there is no request body. + req.Header.Set("Content-Type", "application/json") return req, nil }