brackets for ipv6

This commit is contained in:
Aiden McClelland
2024-07-26 12:30:26 -06:00
parent a3b94816f9
commit 6d42ae2629

View File

@@ -90,6 +90,8 @@ export const addressHostToUrl = (
} else if (host.kind === "ip") {
if (host.hostname.kind === "domain") {
hostname = `${host.hostname.subdomain ? `${host.hostname.subdomain}.` : ""}${host.hostname.domain}`
} else if (host.hostname.kind === "ipv6") {
hostname = `[${host.hostname.value}]`
} else {
hostname = host.hostname.value
}