Closed m0t1x closed 6 months ago
Do we agree that I close the issue and flag it as "question" and you still created a PR? What exactly do you expect from this behavior?
Hi, As described in the PR, PowerDNS has root API endpoints to provide the version information (https://doc.powerdns.com/recursor/common/api/endpoint-api.html). Some PowerDNS deployment don't have these endpoints exposed and without them it is not possible to auto-detect PowerDNS API version and the whole process with lego fails. Using custom variable to set the API version, you can skip the API version auto-detection and the process will continue. I found I am not the only one with this issue, but it's up to you to see whether you want to have this feature or not. Best Regards,Marijan
I agree, powerdns 4.* does not have this endpoint, so i had to hack into the code in order to set the apiVersion to 1.
I am setting PDNS_API_URL=https://server/api/v1 - all works until the PATCH command. The patch command is using zone.URL as path and it is coming from pdns "url": "/api/v1/servers/localhost/zones/domain.com."
- since we do call a c.Host.JoinPath
inside pdns/client.go/joinPath function. It automatically does the url as "/api/v1/api/v1/servers/localhost/zones/domain.com" at PATCH (UpdateRecords call inside pdns/internal/client.go)
Some PowerDNS servers don't have exposed the root API endpoints and PowerDNS API version auto-detection fails. Use the optional parameter
PDNS_CUSTOM_API_VERSION
to set the version number in such situations.related to #2016