Cubari: Fix brotli issue (#65)
This commit is contained in:
parent
f5395f23bb
commit
525daaa6d9
@ -6,7 +6,7 @@ ext {
|
|||||||
extName = 'Cubari'
|
extName = 'Cubari'
|
||||||
pkgNameSuffix = "all.cubari"
|
pkgNameSuffix = "all.cubari"
|
||||||
extClass = '.CubariFactory'
|
extClass = '.CubariFactory'
|
||||||
extVersionCode = 23
|
extVersionCode = 24
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
@ -38,6 +38,16 @@ open class Cubari(override val lang: String) : HttpSource() {
|
|||||||
|
|
||||||
private val json: Json by injectLazy()
|
private val json: Json by injectLazy()
|
||||||
|
|
||||||
|
override val client = super.client.newBuilder()
|
||||||
|
.addInterceptor { chain ->
|
||||||
|
val request = chain.request()
|
||||||
|
val headers = request.headers.newBuilder()
|
||||||
|
.removeAll("Accept-Encoding")
|
||||||
|
.build()
|
||||||
|
chain.proceed(request.newBuilder().headers(headers).build())
|
||||||
|
}
|
||||||
|
.build()
|
||||||
|
|
||||||
override fun headersBuilder() = Headers.Builder().apply {
|
override fun headersBuilder() = Headers.Builder().apply {
|
||||||
add(
|
add(
|
||||||
"User-Agent",
|
"User-Agent",
|
||||||
|
Loading…
Reference in New Issue
Block a user