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:
arkon
2020-08-22 12:49:00 -04:00
parent 3f1355c413
commit 9920ff617b
3 changed files with 8 additions and 6 deletions
@@ -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)