parent
1f160d3352
commit
79690a5934
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = 'Mangahere'
|
extName = 'Mangahere'
|
||||||
extClass = '.Mangahere'
|
extClass = '.Mangahere'
|
||||||
extVersionCode = 20
|
extVersionCode = 21
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -36,7 +36,6 @@ class Mangahere : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun headersBuilder(): Headers.Builder = super.headersBuilder()
|
override fun headersBuilder(): Headers.Builder = super.headersBuilder()
|
||||||
.set("Referer", "$baseUrl/")
|
.set("Referer", "$baseUrl/")
|
||||||
.set("Cache-Control", "no-cache")
|
|
||||||
|
|
||||||
private val cookieInterceptor = CookieInterceptor(
|
private val cookieInterceptor = CookieInterceptor(
|
||||||
baseUrl.substringAfter("://"),
|
baseUrl.substringAfter("://"),
|
||||||
|
@ -47,13 +46,6 @@ class Mangahere : ParsedHttpSource() {
|
||||||
|
|
||||||
private val notRateLimitClient: OkHttpClient = network.cloudflareClient.newBuilder()
|
private val notRateLimitClient: OkHttpClient = network.cloudflareClient.newBuilder()
|
||||||
.addNetworkInterceptor(cookieInterceptor)
|
.addNetworkInterceptor(cookieInterceptor)
|
||||||
.addNetworkInterceptor { chain ->
|
|
||||||
val newRequest = chain.request().newBuilder()
|
|
||||||
.header("Cache-Control", "no-cache")
|
|
||||||
.removeHeader("If-Modified-Since")
|
|
||||||
.build()
|
|
||||||
chain.proceed(newRequest)
|
|
||||||
}
|
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
override val client: OkHttpClient = notRateLimitClient.newBuilder()
|
override val client: OkHttpClient = notRateLimitClient.newBuilder()
|
||||||
|
|
Loading…
Reference in New Issue