TomTom Maps for JavaScript
    Preparing search index...

    Function isProxyCredentialsMode

    • Whether the SDK is configured for a credentials proxy, such as the demos proxy.

      That is the case with no apiKey, undefined and '' alike, and a non-default commonBaseURL. The proxy injects the real key server-side from a cookie-gated session.

      • In this mode, SDK requests attach credentials: 'include', so the proxy's session cookie travels with them.
      • Otherwise, credentials stay at the browser default, which keeps backends that answer with Access-Control-Allow-Origin: * working: the browser rejects credentialed responses against a wildcard origin. A service call that adds its own apiKey to a request for the configured proxy is the exception: it sends the key and keeps credentials: 'include', since the proxy overrides the key and gates on the cookie.

      Parameters

      • config: Partial<Pick<GlobalConfig, "apiKey" | "commonBaseURL">> = ...

        The config to inspect, by default the global TomTomConfig.

      Returns boolean