Support wildcard resources

This commit is contained in:
Owen
2025-12-16 21:33:13 -05:00
committed by Owen Schwartz
parent a21029582e
commit 9de39dbe42
2 changed files with 4 additions and 4 deletions

View File

@@ -39,8 +39,8 @@ const createSiteResourceSchema = z
alias: z alias: z
.string() .string()
.regex( .regex(
/^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/, /^(?:[a-zA-Z0-9*?](?:[a-zA-Z0-9*?-]{0,61}[a-zA-Z0-9*?])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/,
"Alias must be a fully qualified domain name (e.g., example.com)" "Alias must be a fully qualified domain name with optional wildcards (e.g., example.com, *.example.com, host-0?.example.internal)"
) )
.optional(), .optional(),
userIds: z.array(z.string()), userIds: z.array(z.string()),

View File

@@ -50,8 +50,8 @@ const updateSiteResourceSchema = z
alias: z alias: z
.string() .string()
.regex( .regex(
/^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/, /^(?:[a-zA-Z0-9*?](?:[a-zA-Z0-9*?-]{0,61}[a-zA-Z0-9*?])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/,
"Alias must be a fully qualified domain name (e.g., example.internal)" "Alias must be a fully qualified domain name with optional wildcards (e.g., example.internal, *.example.internal, host-0?.example.internal)"
) )
.nullish(), .nullish(),
userIds: z.array(z.string()), userIds: z.array(z.string()),