Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerDNS PDNS_API_URL API version issue #2016

Closed
3 tasks done
m0t1x opened this issue Sep 8, 2023 · 1 comment
Closed
3 tasks done

PowerDNS PDNS_API_URL API version issue #2016

m0t1x opened this issue Sep 8, 2023 · 1 comment
Labels

Comments

@m0t1x
Copy link
Contributor

m0t1x commented Sep 8, 2023

Welcome

  • Yes, I'm using a binary release within 2 latest releases.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, config, etc).

What did you expect to see?

Would lilke that lego accepts API version in PDNS_API_URL or to detect the version properly.

What did you see instead?

When 'PDNS_API_URL' is set to 'http://server/', without 'api/v1' prefix, API version is not detected and all pdns requests are made to / instead to /api/v1 so all PowerDNS requests fails.

When 'PDNS_API_URL' is set to 'http://server/api/v1' all pdns requests are made to /api/v1/api/v1. So version prefix is duplicated and again all PowerDNS request fails.

Why not just allow API version in URL?

Another project noticed the same issue - traefik/traefik#9726

How do you use lego?

Binary

Reproduction steps

  1. Install lego
  2. Configure PDNS_API_KEY and PDNS_API_URL with http://server or with http://server/api/v1
  3. Run
lego -a \                                             
-d <domain> \
-m <e-mail> \
--server <ACME server if used > \
--dns pdns \
renew

Version of lego

lego version 4.14.0 darwin/arm64

Logs

PDNS_API_URL=https://< server >/api/v1

...
<title>Error</title>
</head>
<body>
<pre>Cannot GET /api/v1/api</pre>
</body>
</html>
...

PDNS_API_URL=https://< server >

...
<title>Error</title>
</head>
<body>
<pre>Cannot GET /api</pre>
</body>
</html>
...

Go environment (if applicable)

No response

@m0t1x m0t1x added the bug label Sep 8, 2023
@ldez ldez added question and removed bug labels Sep 8, 2023
@ldez
Copy link
Member

ldez commented Sep 8, 2023

Hello,

I explained the behavior here: traefik/traefik#9726 (comment)

Why not just allow API version in URL?

Because there are several use-cases depending on users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants