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

Add trailing dot to cnames #15

Merged
merged 2 commits into from
May 10, 2024
Merged

Conversation

peterablehmann
Copy link
Contributor

This makes the behavior consistent between NS, MX, SRV and CNAME records.

If you use CNAMEs a trailing dot will now be added automatically.
This behavior is in line with other record types that use dns names.

This breaks using subdomain paths in CNAMEs and if you are using full domain names
in CNAMEs you will need to remove the trailing dot in your config.

zones."example.org"."example".cname.data = "example2"-> example.example.org IN CNAME example2.
You will now have to write it as:
zones."example.org"."example".cname.data = "example2.example.org"-> example.example.org IN CNAME example2.example.org.

This makes the behavior consistent between NS, MX, SRV and CNAME records
Copy link
Owner

@Janik-Haag Janik-Haag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh seems like you found a bug :)
Would you mind adding something like:

      "myFancyRedirect".cname.data = "example.net.";

to the example.com zone in example/dns.nix, so it also gets automatically tested in ci other then that the change looks good to me.

@Janik-Haag
Copy link
Owner

uh and you have to updated the existing unit tests ^^

@peterablehmann
Copy link
Contributor Author

peterablehmann commented May 7, 2024

Uh seems like you found a bug :) Would you mind adding something like:

      "myFancyRedirect".cname.data = "example.net.";

to the example.com zone in example/dns.nix, so it also gets automatically tested in ci other then that the change looks good to me.

I'm not sure what you want me to do. There is already a correct CNAME example present. "redirect".cname.data = "example.net"; And wouldn't a wrong one only confuse future users?

@Janik-Haag Janik-Haag merged commit c4f734d into Janik-Haag:main May 10, 2024
1 check passed
@peterablehmann peterablehmann deleted the fix-cnames branch May 11, 2024 19:18
peterablehmann added a commit to peterablehmann/nix-servers that referenced this pull request May 11, 2024
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

Successfully merging this pull request may close these issues.

2 participants