From fb6257d346dd9715cc17e9b6e413dcf90c183a04 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Sun, 23 Jan 2022 14:00:26 +0530 Subject: [PATCH] fix: match http(s) localhost urls only --- src/shared/shared.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/shared.ts b/src/shared/shared.ts index 336e92df..2d41c3ea 100644 --- a/src/shared/shared.ts +++ b/src/shared/shared.ts @@ -10,7 +10,7 @@ export type { } from '../../types/shared' export const EXTERNAL_URL_RE = /:\/\/|\.(?!html|md)\w+($|\?)/i -export const LOCALHOST_URL_RE = /:\/\/localhost:/ +export const LOCALHOST_URL_RE = /^https?:\/\/localhost:/ // @ts-ignore export const inBrowser = typeof window !== 'undefined'