Allow wildcard dns zone records (#536)

This commit is contained in:
Eduard Gert
2026-01-20 17:32:14 +01:00
committed by GitHub
parent 3a30f76629
commit 818ba5daa4

View File

@@ -101,8 +101,9 @@ export function DNSRecordModalContent({
const domainError = useMemo(() => { const domainError = useMemo(() => {
if (domain == "") return ""; if (domain == "") return "";
if (domain === "*") return "";
const valid = validator.isValidDomain(domain, { const valid = validator.isValidDomain(domain, {
allowWildcard: false, allowWildcard: true,
allowOnlyTld: true, allowOnlyTld: true,
}); });
if (!valid) { if (!valid) {
@@ -210,12 +211,13 @@ export function DNSRecordModalContent({
<div className={"w-full mb-3"}> <div className={"w-full mb-3"}>
<Label>Hostname</Label> <Label>Hostname</Label>
<HelpText> <HelpText>
Enter a subdomain or leave empty to use the primary domain. Enter a subdomain, wildcard or leave empty to use the primary
domain.
</HelpText> </HelpText>
<div className={"flex w-full"}> <div className={"flex w-full"}>
<Input <Input
autoFocus={true} autoFocus={true}
placeholder={"Subdomain (leave empty for primary domain)"} placeholder={"E.g., dev, * or leave empty for primary domain"}
errorTooltip={true} errorTooltip={true}
errorTooltipPosition={"bottom"} errorTooltipPosition={"bottom"}
error={domainError} error={domainError}