assertAllowedUrl
assertAllowedUrl(
url,policy?):Promise<AddressCheckResult>
Defined in: packages/tools/src/web/address-policy.ts:227
Throws unless url may be fetched. Order: scheme (absolute — nothing below exempts a
non-http(s) URL) → allowPrivateNetwork / concrete-host 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>