assertAllowedUrl
assertAllowedUrl(
url,policy?):Promise<AddressCheckResult>
Defined in: web/address-policy.ts:143
Throws unless url may be fetched. Order: scheme (absolute — nothing below exempts a
non-http(s) URL) → allowPrivateNetwork/allowedUrls → the address itself (a literal IP, or
every address a domain name resolves to — both regardless of scheme).
When a domain resolves, every answer must pass, not merely one: the connection picks an address from that set and this code doesn’t choose which, so a mixed public/private answer is refused.
Parameters
Section titled “Parameters”URL
policy?
Section titled “policy?”AddressPolicy = {}
Returns
Section titled “Returns”Promise<AddressCheckResult>