OptionalMaxRedirects?: numberMaximum number of redirect hops to follow (each re-validated). Default: 5.
OptionalStripHeadersOnCrossOriginRedirect?: booleanDrop every caller-supplied header when a redirect leaves the original origin. Default: false.
Redirects are followed by hand here, so the browser rule that strips Authorization on a
cross-origin hop does not apply — the caller's headers go wherever the chain leads. A caller
sending credentials (an API key, a session cookie) sets this so a source that redirects to a
third party cannot collect them.
Everything the standard
fetchinit accepts, plus a redirect cap.redirectis deliberately not honored: SafeFetch always drives redirects manually so it can re-validate each hop, and silently acceptingredirect: 'follow'would hand that back to the platform and defeat the guard.