mirror of
https://github.com/netbirdio/dashboard.git
synced 2026-01-26 01:21:04 +00:00
Allow wildcard dns zone records (#536)
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user