Skip to content
GuidesToolkitAPI

setAllowUntrustedHosts

setAllowUntrustedHosts(allow): void

Defined in: packages/expo-arcgis/src/auth.ts:38

Installs (or removes) a network-layer handler that trusts every TLS server-trust challenge, including self-signed and expired certificates.

For development and on-premises ArcGIS Enterprise only. Disabling TLS certificate validation makes all SDK network connections vulnerable to man-in-the-middle attacks — never call this with true in a production app or against public-internet services.

  • true → trust all server-trust challenges (bypass certificate validation).
  • false → remove the override and restore normal TLS validation (the default).

On iOS, App Transport Security rejects an untrusted host before this handler sees it. Allow the host in Info.plist as well: NSAppTransportSecurity › NSExceptionDomains › the host › NSExceptionAllowsInsecureHTTPLoads.

boolean

void