From 942c9541a2294f9ef4d19bb1d7092b3c14a74407 Mon Sep 17 00:00:00 2001 From: Blatzar <46196380+Blatzar@users.noreply.github.com> Date: Mon, 22 Aug 2022 19:47:58 +0200 Subject: [PATCH] Fix CloudflareKiller (remove cookies on init) --- .../com/lagradost/cloudstream3/network/CloudflareKiller.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt index 05836269..ceacb9aa 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt @@ -23,6 +23,11 @@ class CloudflareKiller : Interceptor { } } + init { + // Needs to clear cookies between sessions to generate new cookies. + CookieManager.getInstance().removeAllCookies(null) + } + val savedCookies: MutableMap> = mutableMapOf() override fun intercept(chain: Interceptor.Chain): Response = runBlocking {