From 6bac1fe25f1d954710fbb94d0bee7e094551ad97 Mon Sep 17 00:00:00 2001 From: johnathan White Date: Tue, 16 Dec 2025 19:18:58 -0500 Subject: [PATCH] disabled url caching --- ios/BitPayApp/AppDelegate.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ios/BitPayApp/AppDelegate.swift b/ios/BitPayApp/AppDelegate.swift index 07193b9cdd..49b27ed5a4 100644 --- a/ios/BitPayApp/AppDelegate.swift +++ b/ios/BitPayApp/AppDelegate.swift @@ -82,9 +82,16 @@ class AppDelegate: UIResponder, UIApplicationDelegate, BrazeInAppMessageUIDelega brazeObj.inAppMessagePresenter = inAppUI } + // Disable URL caching globally to prevent sensitive data disclosure + URLCache.shared.removeAllCachedResponses() + URLCache.shared = URLCache(memoryCapacity: 0, diskCapacity: 0, diskPath: nil) + // Custom NSURLProtocol to whitelist URL prefixes RCTSetCustomNSURLSessionConfigurationProvider { let configuration = URLSessionConfiguration.default + // Disable caching for all network requests + configuration.urlCache = nil + configuration.requestCachePolicy = .reloadIgnoringLocalCacheData var classes = configuration.protocolClasses ?? [] classes.insert(AllowedUrlPrefixProtocol.self, at: 0) configuration.protocolClasses = classes