Merge pull request #4972 from Dokploy/fix/domain-single-label-hostname

fix(domain): allow single-label hostnames without a TLD

(cherry picked from commit 75448f358e)

[skip ci]
This commit is contained in:
Mauricio Siu
2026-08-06 06:33:27 +00:00
committed by Dokploy Bot
parent 4e675d6f3f
commit 5ed94954e6
2 changed files with 5 additions and 3 deletions
@@ -9,6 +9,9 @@ describe("VALID_HOSTNAME_REGEX", () => {
"a.b.c.example.co",
"xn--80ak6aa92e.com",
"123.example.com",
"example",
"dokploy-server",
"localhost",
])("accepts valid hostname %s", (host) => {
expect(VALID_HOSTNAME_REGEX.test(host)).toBe(true);
});
@@ -17,7 +20,6 @@ describe("VALID_HOSTNAME_REGEX", () => {
"bbn_client.example.com",
"-example.com",
"example-.com",
"example",
"exa mple.com",
"example..com",
"",