mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-05-05 10:49:15 +00:00
Problem - Genz Updates could still return 403/Cloudflare in extension requests even when the same site worked in WebView. - The extension HTTP path primarily used cached cookies from settings instead of reliably using the current WebView cookie jar. - Cloudflare challenge detection was too narrow (mostly English markers) and could misclassify localized challenge pages as resolved. Solution - Prefer live WebView cookies for outgoing extension HTTP requests, with settings cookies as fallback. - Sync cookie + user-agent from embedded WebView on onLoadStop in addition to history updates. - Expand challenge detection with additional multilingual and platform markers. Implementation Details - Updated `MCookieManager.interceptRequest` to read cookies from `CookieManager.getCookies()` and use them as the request `Cookie` header when available. - Added `_syncCookieAndUaFromWebView()` in `MangaWebView` and invoked it from both `onLoadStop` and `onUpdateVisitedHistory` to persist fresh clearance cookies immediately. - Introduced a centralized `_cloudflareChallengePattern` in `m_client.dart` and reused it in `_containsCloudflareChallengeHtml` and `_isCloudflareChallengePage` for consistent challenge detection. |
||
|---|---|---|
| .. | ||
| webview.dart | ||