function isValidHttpUrl
isValidHttpUrl(raw: string): boolean

Checks whether raw is an http(s) URL on a host that isn't private, or a link to one of this site's own pages. Routes and services check a URL with it before storing, previewing or proxying it; it does no DNS lookup, which fetchWithTimeout does.

Parameters

raw: string

Return Type

boolean

Usage

import { isValidHttpUrl } from "api/remote/fetch.ts";