MangaHere: Remove no-cache header (#5259)

remove no cache
This commit is contained in:
bapeey 2024-09-27 08:25:49 -05:00 committed by Draff
parent 1f160d3352
commit 79690a5934
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 1 additions and 9 deletions

View File

@ -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"

View File

@ -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()