caddy-dns / duckdns

Caddy module: dns.providers.duckdns
46 stars 11 forks source link

Allow domain overrides for challenge delegation #2

Closed jpeddicord closed 3 years ago

jpeddicord commented 3 years ago

For more information, see https://github.com/libdns/duckdns/pull/1

This commit adds Caddyfile parsing for an override_domain directive.


Should be pretty straightforward -- this adds override_domain in the same manner as api_token was being parsed. I did not add it as an argument to the main directive as I don't think it'll be as commonly used.

I also changed the parsing for api_token -- unless I missed something, I think this wasn't working. That NextArg call has to happen to get the parser to move on from api_token to the provided value.

Currently writing up a description of this in the README; I'll un-mark draft status once I have that up.

francislavoie commented 3 years ago

While you're at it, could you set the markdown code block language in the README to json? I forgot to do it, might as well do it now while you're updating the README :smile:

jpeddicord commented 3 years ago

Done; changed that and fixed up a lingering cloudflare in an example too. :D

francislavoie commented 3 years ago

Could you add a quick section above ## Config examples with the actual Caddyfile syntax definition? i.e. the thing in the comment in the code.

Also please add the new option to the example JSON config as well.

jpeddicord commented 3 years ago

Yep, something like that?

jpeddicord commented 3 years ago

Done. I can rebase this all down to 1 commit if you prefer too, just let me know.

francislavoie commented 3 years ago

Done. I can rebase this all down to 1 commit if you prefer too, just let me know.

No worry, I tend to squash merge. :smile: