pdns: fix notify (#1983)

This commit is contained in:
Sylvain Desbureaux 2023-08-03 14:37:24 +02:00 committed by GitHub
parent 3cefc7a51b
commit 35c259e91d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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")
}