fix: match http(s) localhost urls only

pull/503/head
Divyansh Singh 4 years ago committed by GitHub
parent c4d659d8c3
commit fb6257d346
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,7 +10,7 @@ export type {
} from '../../types/shared' } from '../../types/shared'
export const EXTERNAL_URL_RE = /:\/\/|\.(?!html|md)\w+($|\?)/i export const EXTERNAL_URL_RE = /:\/\/|\.(?!html|md)\w+($|\?)/i
export const LOCALHOST_URL_RE = /:\/\/localhost:/ export const LOCALHOST_URL_RE = /^https?:\/\/localhost:/
// @ts-ignore // @ts-ignore
export const inBrowser = typeof window !== 'undefined' export const inBrowser = typeof window !== 'undefined'

Loading…
Cancel
Save