From 1aad9c6aa984bf2fcf5be6ac5f00fe55bce6438d Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Thu, 14 Mar 2024 19:51:20 +0100 Subject: [PATCH] fix(ios): overwrite CORS headers on livereload (#7349) --- ios/Capacitor/Capacitor/WebViewAssetHandler.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Capacitor/Capacitor/WebViewAssetHandler.swift b/ios/Capacitor/Capacitor/WebViewAssetHandler.swift index 2919bee66b..4673185d88 100644 --- a/ios/Capacitor/Capacitor/WebViewAssetHandler.swift +++ b/ios/Capacitor/Capacitor/WebViewAssetHandler.swift @@ -172,7 +172,7 @@ internal class WebViewAssetHandler: NSObject, WKURLSchemeHandler { ] } - if let mergedHeaders = existingHeaders.merging(newHeaders, uniquingKeysWith: { (current, _) in current }) as? [String: String] { + if let mergedHeaders = existingHeaders.merging(newHeaders, uniquingKeysWith: { (_, newHeaders) in newHeaders }) as? [String: String] { if let responseUrl = response.url { if let modifiedResponse = HTTPURLResponse(