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

Third Level Domains not correctly stripped for netcup API #22

Open
dadosch opened this issue Mar 19, 2022 · 2 comments
Open

Third Level Domains not correctly stripped for netcup API #22

dadosch opened this issue Mar 19, 2022 · 2 comments

Comments

@dadosch
Copy link

dadosch commented Mar 19, 2022

Currently, a third level domain like third.level.example.com gets stripped to level.example.com by getHostname().

Correct would be of course example.com, otherwise the API responds with 5029, "Can not get DNS records for zone. Domain not found."

@NiiWiiCamo
Copy link

Am I correct in the following assumptions?

  1. Third level domains like third.level.example.com should still be added to the example.com zone.
  2. Netcup handles this by using "third.level" as the host for a record.
  3. This script needs to strip the last two or three domain levels, depending on the TLD.

In this case I propose using a separate (optional) parameter for the requests. That way you could manually assign the parent domain and host parts of the address.
So instead of using "&domain=third.level.example.com" we could use "&host=third.level&domain=example.com". Might need to use another parameter name for domain, but this should work

@NiiWiiCamo
Copy link

Edit: I know it is probably too late, but I added support in my fork, PR with several additions is opened. For anyone interested in the future.

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

No branches or pull requests

2 participants