Creates the bridge that fetches web resources under an SSRF policy: allowed
schemes only, no private or local destinations (checked again on every redirect
hop and, when a resolver is supplied, after name resolution), a redirect cap, a
time limit and a byte limit enforced on the streamed body.
In a browser the hop check needs the redirect itself, which the fetch API
hides: a redirect arrives as an opaque response and is refused with
denied:redirect-unverifiable. Cross-origin rules still apply there; a
request the browser blocks, or an opaque answer, is unavailable:network.
On a server, redirects arrive as 3xx with a location and are followed.
The fetch API cannot pin a connection to a validated address, so the resolver
check narrows the DNS-rebinding window without closing it. kernl's shell wires
no resolver today, so hostnames are judged as literals only.
Creates the bridge that fetches web resources under an SSRF policy: allowed schemes only, no private or local destinations (checked again on every redirect hop and, when a resolver is supplied, after name resolution), a redirect cap, a time limit and a byte limit enforced on the streamed body.
In a browser the hop check needs the redirect itself, which the fetch API hides: a redirect arrives as an opaque response and is refused with
denied:redirect-unverifiable. Cross-origin rules still apply there; a request the browser blocks, or an opaque answer, isunavailable:network. On a server, redirects arrive as 3xx with a location and are followed.The fetch API cannot pin a connection to a validated address, so the resolver check narrows the DNS-rebinding window without closing it. kernl's shell wires no resolver today, so hostnames are judged as literals only.