From 2140e40bbbd6911e421411e37ff2b09222dccf1b Mon Sep 17 00:00:00 2001 From: Mike <51273546+SnakeDoc83@users.noreply.github.com> Date: Mon, 9 Sep 2019 19:23:00 -0400 Subject: [PATCH] ReadMangaToday referer header (#1488) ReadMangaToday referer header --- src/en/readmangatoday/build.gradle | 2 +- .../tachiyomi/extension/en/readmangatoday/Readmangatoday.kt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/en/readmangatoday/build.gradle b/src/en/readmangatoday/build.gradle index 8e21b99b3..41f8924ae 100644 --- a/src/en/readmangatoday/build.gradle +++ b/src/en/readmangatoday/build.gradle @@ -5,7 +5,7 @@ ext { appName = 'Tachiyomi: ReadMangaToday' pkgNameSuffix = 'en.readmangatoday' extClass = '.Readmangatoday' - extVersionCode = 7 + extVersionCode = 8 libVersion = '1.2' } diff --git a/src/en/readmangatoday/src/eu/kanade/tachiyomi/extension/en/readmangatoday/Readmangatoday.kt b/src/en/readmangatoday/src/eu/kanade/tachiyomi/extension/en/readmangatoday/Readmangatoday.kt index 982a46f4a..83d727adb 100644 --- a/src/en/readmangatoday/src/eu/kanade/tachiyomi/extension/en/readmangatoday/Readmangatoday.kt +++ b/src/en/readmangatoday/src/eu/kanade/tachiyomi/extension/en/readmangatoday/Readmangatoday.kt @@ -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 {