From 17b2489bc128fb5313ae91e5bbb2dec6da238300 Mon Sep 17 00:00:00 2001 From: Horis <8674809+821938089@users.noreply.github.com> Date: Fri, 17 Jan 2025 19:54:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/http/CookieManager.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/help/http/CookieManager.kt b/app/src/main/java/io/legado/app/help/http/CookieManager.kt index cc666b9a942e..2401b8290d9e 100644 --- a/app/src/main/java/io/legado/app/help/http/CookieManager.kt +++ b/app/src/main/java/io/legado/app/help/http/CookieManager.kt @@ -142,10 +142,11 @@ object CookieManager { } fun applyToWebView(url: String) { + val baseUrl = NetworkUtils.getBaseUrl(url) ?: return val cookies = CookieStore.getCookie(url).splitNotBlank(";") val cookieManager = CookieManager.getInstance() cookies.forEach { - cookieManager.setCookie(url, it) + cookieManager.setCookie(baseUrl, it) } }