libdns / porkbun

MIT License
3 stars 1 forks source link

Porkbun DDNS fails with 404 error via caddy #5

Open LorenDB opened 9 months ago

LorenDB commented 9 months ago

I reported an error with Porkbun DDNS on the Caddy forums and was recommended to open an issue here.

The problem seems to be that something, apparently in this module, is requesting an API endpoint that doesn't exist; Porkbun is responding with a 404 page. Do you think that this is a problem in this module?

cajomar commented 8 months ago

I'm also experiencing this error. After playing around with the porkbun API endpoints used by this module, it seems the error The URI you submitted has disallowed characters. is triggered by sending @ as the name for root domains. According to the porkbun api docs, the field should instead be omitted:

  • name - optional The subdomain for the record being created, not including the domain itself. Leave blank to create a record on the root domain. Use * to create a wildcard record.

So instead of hitting /dns/retrieveByNameType/example.com/A/@ we should hit /dns/retrieveByNameType/example.com/A. The request to /dns/edit/example.com/12345678 should remove the name field from the body sent.

rossmarkflo commented 3 months ago

Having the same issue - was there ever a solution to this?

LorenDB commented 3 months ago

I don't know that this was ever fixed. I'm using dness for now to manage my DDNS.