I have looking for a way to set a proxy to WKWebview request with no luck.
By another hand I have been able to set proxy to http request
func createURLSessionConfiguration(_ host:String,_ port:String) -> URLSessionConfiguration {
let config = URLSessionConfiguration.default
config.requestCachePolicy = URLRequest.CachePolicy.reloadIgnoringLocalCacheData
config.connectionProxyDictionary = [AnyHashable: Any]()
config.connectionProxyDictionary?[kCFNetworkProxiesHTTPEnable as String] = 1
config.connectionProxyDictionary?[kCFNetworkProxiesHTTPSProxy as String] = host
config.connectionProxyDictionary?[kCFNetworkProxiesHTTPSPort as String] = port
return config
}
But my question to you guys is how can set the proxy to the WKWebView?
I'll really appreciate your help