Don't intercept on Varnish errors
This commit is contained in:
1 parent
39b7623688
commit
8306640ed6
1 file changed
+2
-1
@@ -21,7 +21,8 @@ class CloudflareInterceptor(context: Context) : WebViewInterceptor(context) {
|
||||
|
||||
override fun shouldIntercept(response: Response): Boolean {
|
||||
// Check if Cloudflare anti-bot is on
|
||||
return response.code in ERROR_CODES && response.header("Server") in SERVER_CHECK
|
||||
return response.code in ERROR_CODES && response.header("Server") in SERVER_CHECK &&
|
||||
response.header("X-Varnish") == null
|
||||
}
|
||||
|
||||
override fun intercept(
|
||||
|
||||
Reference in new issue
Block a user