Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
821938089 committed Jan 17, 2025
1 parent 6128027 commit 17b2489
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/main/java/io/legado/app/help/http/CookieManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 17b2489

Please sign in to comment.