diff options
author | Matthew Miller <matthew@millerti.me> | 2023-08-22 10:13:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-22 10:13:03 -0700 |
commit | fefc95e4535e6ecf903f647124a492fba3fd11d6 (patch) | |
tree | 4c924d43d32fb12a780533302eaf5dee08875d75 /packages/browser/src/helpers/isValidDomain.ts | |
parent | 443c341bc2163f07b93a3ef84a43294d10b826f8 (diff) | |
parent | 2935857c76d458c26701842e500f8d97d17499c5 (diff) |
Merge pull request #425 from MasterKale/feat/server-esm-take-2-dnt
feat/server-esm-take-2-dnt
Diffstat (limited to 'packages/browser/src/helpers/isValidDomain.ts')
-rw-r--r-- | packages/browser/src/helpers/isValidDomain.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/browser/src/helpers/isValidDomain.ts b/packages/browser/src/helpers/isValidDomain.ts index 4d2eedd..22f045f 100644 --- a/packages/browser/src/helpers/isValidDomain.ts +++ b/packages/browser/src/helpers/isValidDomain.ts @@ -9,6 +9,7 @@ export function isValidDomain(hostname: string): boolean { return ( // Consider localhost valid as well since it's okay wrt Secure Contexts - hostname === 'localhost' || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(hostname) + hostname === 'localhost' || + /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(hostname) ); } |