Member Junction
    Preparing search index...
    SafeFetchInit: RequestInit & {
        MaxRedirects?: number;
        StripHeadersOnCrossOriginRedirect?: boolean;
    }

    Everything the standard fetch init accepts, plus a redirect cap.

    redirect is deliberately not honored: SafeFetch always drives redirects manually so it can re-validate each hop, and silently accepting redirect: 'follow' would hand that back to the platform and defeat the guard.

    Type Declaration

    • OptionalMaxRedirects?: number

      Maximum number of redirect hops to follow (each re-validated). Default: 5.

    • OptionalStripHeadersOnCrossOriginRedirect?: boolean

      Drop 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.