Open ednxzu opened 4 months ago
Hi @ednxzu, yes that seems to be a limitation of the front end right now. We are going to fix that. Till then if you need this earlier you can try setting the domain by calling the API directly.
Hey @pascal-fischer, also very curious about this one but I tried via api (route /api/dns/nameservers/{nameserverid}
) and when including any of the following:
consul
.consul
consul.
in the body payload under "domains", it will return a 422 (Unprocessable content) - if you change that to abc.consul
with nothing else different it goes through. The message in the response is:
{"message":"nameserver group got an invalid domain: consul \"domain should consists of only letters, numbers, and hyphens with no leading, trailing hyphens, or spaces\"","code":422}
So it does appear the same format checks present in the UI are also present in the backend. The regex used to dictate this is declared here: https://github.com/netbirdio/netbird/blob/main/management/server/nameserver.go#L17
You can confirm at regex101.com that for the current regular expression ^(?i)[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,}$
the test string "consul.com" validates but simply "consul" or "consul." does not.
Ah you are right, my bad. Then we need to update and test this on the backend as well.
Describe the problem
Netbird currently does not allow you to pass a top level domain to resolve.
Example: one cannot have a match domain scoped to
consul.
, that would allow to resolve anything under *.consulI believe this is only a GUI issue in the dashboard, and the feature should (???) work, it just cannot be set because of some UI input filter.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
match domain should support TLD scope
Are you using NetBird Cloud?
No
NetBird version
0.27.3