diff --git a/packages/frontend/src/scripts/url.ts b/packages/frontend/src/scripts/url.ts index d65816e28e1f..07fb900995a8 100644 --- a/packages/frontend/src/scripts/url.ts +++ b/packages/frontend/src/scripts/url.ts @@ -23,6 +23,6 @@ export function appendQuery(url: string, query: string): string { } export function extractDomain(url: string) { - const match = url.match(/^(https?)?:?\/{0,2}([^\/]+)/); + const match = url.match(/^(?:https?:)?(?:\/\/)?(?:[^@\n]+@)?([^:\/\n]+)/im); return match ? match[2] : null; }