rmbolger / Posh-ACME

PowerShell module and ACME client to create certificates from Let's Encrypt (or other ACME CA)
https://poshac.me/docs/latest/
MIT License
778 stars 190 forks source link

Update Porkbun with new API endpoint #571

Closed rmbolger closed 1 month ago

rmbolger commented 1 month ago

This change is primarily to address issue #570 in which Porkbun has published that the API endpoint is changing from porkbun.com to api.porkbun.com. The new name is live and the old name scheduled for decom on 2024-12-01.

Instead of hard coding the new endpoint, it's now configurable via an optional PorkbunAPIHost parameter which has api.porkbun.com as the default. Existing users should not need to make any changes to their PluginArgs.

There's also a bit of minor refactoring in the plugin including a new retry mechanic for API calls. During testing against the new endpoint, the plugin was frequently getting HTTP 503 (temporarily unavailable) errors. There's no documentation about any explicit rate limiting, but that's what it felt like. So if any given call gets a 503 error, the plugin will retry a few times after a small wait before giving up.