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 4877ccb commit 5985b47
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

0 comments on commit 5985b47

Please sign in to comment.