Skip to content

Commit

Permalink
Support wildcard domains lookup 🌟
Browse files Browse the repository at this point in the history
  • Loading branch information
wotschofsky committed Jan 6, 2024
1 parent bd9c079 commit 7f62cf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/isValidDomain.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const isValidDomain = (domain: string) =>
/^(((?!-))(xn--|_)?[a-z0-9-]{0,61}[a-z0-9]{1,1}\.)*(xn--)?([a-z0-9][a-z0-9\-]{0,60}|[a-z0-9-]{1,30}\.[a-z]{2,})$/.test(
/^(\*\.)?(((?!-))(xn--|_)?[a-z0-9-]{0,61}[a-z0-9]{1,1}\.)*(xn--)?([a-z0-9][a-z0-9\-]{0,60}|[a-z0-9-]{1,30}\.[a-z]{2,})$/.test(
domain
);

Expand Down

1 comment on commit 7f62cf1

@vercel
Copy link

@vercel vercel bot commented on 7f62cf1 Jan 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.