From 35c259e91dbeddc565181fe481de764f7060c290 Mon Sep 17 00:00:00 2001 From: Sylvain Desbureaux <37377804+sylvainOL@users.noreply.github.com> Date: Thu, 3 Aug 2023 14:37:24 +0200 Subject: [PATCH] pdns: fix notify (#1983) --- providers/dns/pdns/internal/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/providers/dns/pdns/internal/client.go b/providers/dns/pdns/internal/client.go index cddb1c63..d7b247a4 100644 --- a/providers/dns/pdns/internal/client.go +++ b/providers/dns/pdns/internal/client.go @@ -218,7 +218,8 @@ func newJSONRequest(ctx context.Context, method string, endpoint *url.URL, paylo req.Header.Set("Accept", "application/json") - if payload != nil { + // PowerDNS doesn't follow HTTP convention about the "Content-Type" header. + if method != http.MethodGet && method != http.MethodDelete { req.Header.Set("Content-Type", "application/json") }