Skip to content

Commit

Permalink
fix: allow valid ipv6 as hostnames
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Sep 8, 2023
1 parent 7d34ab9 commit 78dd4b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function detectStackblitzURL(entry?: string) {
}
}

const HOSTNAME_RE = /^(?!-)[\d.A-Za-z-]{1,63}(?<!-)$/;
const HOSTNAME_RE = /^(?!-)[\d.:A-Za-z-]{1,63}(?<!-)$/;

export function validateHostname(hostname: string, _public: boolean) {
if (hostname && !HOSTNAME_RE.test(hostname)) {
Expand Down

0 comments on commit 78dd4b7

Please sign in to comment.