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