Clean up X-Requested-With change
This only really affects the initial request, subsequent requests may still use the package name.
This commit is contained in:
@@ -89,7 +89,8 @@ class CloudflareInterceptor(private val context: Context) : Interceptor {
|
||||
var isWebViewOutdated = false
|
||||
|
||||
val origRequestUrl = request.url.toString()
|
||||
val headers = request.headers.toMultimap().mapValues { it.value.getOrNull(0) ?: "" }
|
||||
val headers = request.headers.toMultimap().mapValues { it.value.getOrNull(0) ?: "" }.toMutableMap()
|
||||
headers["X-Requested-With"] = WebViewUtil.REQUESTED_WITH
|
||||
|
||||
handler.post {
|
||||
val webview = WebView(context)
|
||||
|
||||
Reference in New Issue
Block a user