Add Referer header to MangaDex. (#7393)
This commit is contained in:
parent
10eb030895
commit
d191a78d97
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'MangaDex'
|
extName = 'MangaDex'
|
||||||
pkgNameSuffix = 'all.mangadex'
|
pkgNameSuffix = 'all.mangadex'
|
||||||
extClass = '.MangaDexFactory'
|
extClass = '.MangaDexFactory'
|
||||||
extVersionCode = 115
|
extVersionCode = 116
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
containsNsfw = true
|
containsNsfw = true
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,14 +46,14 @@ abstract class MangaDex(override val lang: String, val dexLang: String) :
|
||||||
|
|
||||||
private val helper = MangaDexHelper()
|
private val helper = MangaDexHelper()
|
||||||
|
|
||||||
override fun headersBuilder() = Headers.Builder().apply {
|
override fun headersBuilder() = Headers.Builder()
|
||||||
add("User-Agent", "Tachiyomi " + System.getProperty("http.agent"))
|
.add("Referer", "$baseUrl/")
|
||||||
}
|
.add("User-Agent", "Tachiyomi " + System.getProperty("http.agent"))
|
||||||
|
|
||||||
override val client =
|
override val client = network.client.newBuilder()
|
||||||
network.client.newBuilder().addNetworkInterceptor(mdRateLimitInterceptor).addInterceptor(
|
.addNetworkInterceptor(mdRateLimitInterceptor)
|
||||||
coverInterceptor
|
.addInterceptor(coverInterceptor)
|
||||||
).addInterceptor(MdAtHomeReportInterceptor(network.client, headersBuilder().build()))
|
.addInterceptor(MdAtHomeReportInterceptor(network.client, headersBuilder().build()))
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
// POPULAR Manga Section
|
// POPULAR Manga Section
|
||||||
|
|
Loading…
Reference in New Issue