Manga Demon: Fix "Failed to update dynamic url suffix" (#19032)

Remove Accept-Encoding header
This commit is contained in:
bapeey 2023-11-20 11:34:30 -05:00 committed by GitHub
parent 151a64639b
commit 824c0e44fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Manga Demon'
pkgNameSuffix = 'en.mangademon'
extClass = '.MangaDemon'
extVersionCode = 6
extVersionCode = 7
isNsfw = false
}

View File

@ -32,6 +32,13 @@ class MangaDemon : ParsedHttpSource() {
override val client = network.cloudflareClient.newBuilder()
.rateLimit(1)
.addInterceptor { chain ->
val request = chain.request()
val headers = request.headers.newBuilder()
.removeAll("Accept-Encoding")
.build()
chain.proceed(request.newBuilder().headers(headers).build())
}
.addInterceptor(::dynamicUrlInterceptor)
.build()