ReadMangaToday referer header (#1488)

ReadMangaToday referer header
This commit is contained in:
Mike 2019-09-09 19:23:00 -04:00 committed by arkon
parent b845d9db6e
commit 2140e40bbb
2 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: ReadMangaToday'
pkgNameSuffix = 'en.readmangatoday'
extClass = '.Readmangatoday'
extVersionCode = 7
extVersionCode = 8
libVersion = '1.2'
}

View File

@ -26,11 +26,13 @@ class Readmangatoday : ParsedHttpSource() {
override val client: OkHttpClient get() = network.cloudflareClient
/**
* Search only returns data with this set
* Search only returns data with user-agent and x-requeted-with set
* Referer needed due to some chapters linking images from other domains
*/
override fun headersBuilder() = Headers.Builder().apply {
add("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64)")
add("X-Requested-With", "XMLHttpRequest")
add("Referer", baseUrl)
}
override fun popularMangaRequest(page: Int): Request {