@backblaze-labs/b2-sdk - v0.2.0
    Preparing search index...

    Class FetchTransport

    Default transport implementation using the global fetch API. Automatically sets the User-Agent header on each request and applies the SSRF UrlGuard (if configured) before opening the connection. Redirect following is disabled so redirected URLs cannot bypass the guard or receive credential-bearing headers without an explicit checked request.

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Creates a new FetchTransport.

      Parameters

      • Optionaloptions: { followSameOriginRedirects?: boolean; urlGuard?: UrlGuard; userAgent?: string }

        Optional configuration: custom User-Agent prefix and SSRF guard.

        • OptionalfollowSameOriginRedirects?: boolean

          Follow same-origin GET/HEAD redirects after checking the target with the URL guard. POST redirects are still blocked to avoid replaying credential-bearing payloads to an unexpected endpoint. Defaults to true.

        • OptionalurlGuard?: UrlGuard
        • OptionaluserAgent?: string

      Returns FetchTransport

    Properties

    urlGuard: UrlGuard

    SSRF allow-list applied to every outgoing URL. Mutable so B2Client.authorize() can lock it down post-auth.

    Methods