Fix mangaworld (#8501)
* dont intercept request coming from the cdn eg. skip images * Update build.gradle * fix comment * remove comment * idk * revert version * Update build.gradle.kts * fix without cdn * check content type
This commit is contained in:
parent
f7e3684d45
commit
e6866d43c2
@ -2,4 +2,4 @@ plugins {
|
|||||||
id("lib-multisrc")
|
id("lib-multisrc")
|
||||||
}
|
}
|
||||||
|
|
||||||
baseVersionCode = 3
|
baseVersionCode = 4
|
||||||
|
@ -14,6 +14,12 @@ class CookieRedirectInterceptor(private val client: OkHttpClient) : Interceptor
|
|||||||
override fun intercept(chain: Interceptor.Chain): Response {
|
override fun intercept(chain: Interceptor.Chain): Response {
|
||||||
val request = chain.request()
|
val request = chain.request()
|
||||||
val response = chain.proceed(request)
|
val response = chain.proceed(request)
|
||||||
|
|
||||||
|
val contentType = response.header("content-type")
|
||||||
|
if (contentType != null && contentType.startsWith("image/", ignoreCase = true)) {
|
||||||
|
return response
|
||||||
|
}
|
||||||
|
|
||||||
// ignore requests that already have completed the JS challenge
|
// ignore requests that already have completed the JS challenge
|
||||||
if (response.headers["vary"] != null) return response
|
if (response.headers["vary"] != null) return response
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user