mangayomi-mirror/lib/services
MorningOctober 2c4a4c688b fix(http): align extension requests with WebView cookies and harden Cloudflare detection
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.
2026-03-28 18:17:13 +01:00
..
anime_extractors dart format 2025-05-30 17:43:42 +01:00
download_manager Increase isolate pool size to enhance concurrent download capabilities 2026-01-09 11:48:23 +01:00
http fix(http): align extension requests with WebView cookies and harden Cloudflare detection 2026-03-28 18:17:13 +01:00
trackers update dependencies & update riverpod provider declarations 2026-01-08 14:27:08 +01:00
aniskip.dart dart format 2025-05-30 17:43:42 +01:00
aniskip.g.dart update dependencies & update riverpod provider declarations 2026-01-08 14:27:08 +01:00
fetch_item_sources.dart Add IsolateService for improved asynchronous operations and refactor service calls to utilize it 2025-11-07 16:48:42 +01:00
fetch_item_sources.g.dart update dependencies & update riverpod provider declarations 2026-01-08 14:27:08 +01:00
fetch_sources_list.dart Add service disposal and lifecycle cleanup 2026-01-13 01:11:19 +01:00
fetch_subtitles.dart small bug fix 2025-08-23 21:58:32 +02:00
fetch_watch_order.dart added sequels 2025-08-25 01:52:03 +02:00
get_chapter_pages.dart fix(reader): stabilize chapter progress and page cache writes 2026-03-28 13:49:39 +01:00
get_chapter_pages.g.dart update dependencies & update riverpod provider declarations 2026-01-08 14:27:08 +01:00
get_detail.dart Add IsolateService for improved asynchronous operations and refactor service calls to utilize it 2025-11-07 16:48:42 +01:00
get_detail.g.dart update dependencies & update riverpod provider declarations 2026-01-08 14:27:08 +01:00
get_filter_list.dart Add service disposal and lifecycle cleanup 2026-01-13 01:11:19 +01:00
get_html_content.dart Merge pull request #644 from NBA2K1/main 2026-02-13 10:50:32 +01:00
get_html_content.g.dart Refactor 2026-03-02 11:49:19 +01:00
get_latest_updates.dart Add IsolateService for improved asynchronous operations and refactor service calls to utilize it 2025-11-07 16:48:42 +01:00
get_latest_updates.g.dart update dependencies & update riverpod provider declarations 2026-01-08 14:27:08 +01:00
get_popular.dart Add IsolateService for improved asynchronous operations and refactor service calls to utilize it 2025-11-07 16:48:42 +01:00
get_popular.g.dart update dependencies & update riverpod provider declarations 2026-01-08 14:27:08 +01:00
get_source_baseurl.dart Add service disposal and lifecycle cleanup 2026-01-13 01:11:19 +01:00
get_source_baseurl.g.dart Refactor 2026-03-02 11:49:19 +01:00
get_source_preference.dart Add service disposal and lifecycle cleanup 2026-01-13 01:11:19 +01:00
get_video_list.dart refactor: replace getExtensionService with getIsolateService for page and video list retrieval 2025-11-11 14:51:10 +01:00
get_video_list.g.dart update dependencies & update riverpod provider declarations 2026-01-08 14:27:08 +01:00
isolate_service.dart fix: ensure state is updated only when mounted; increase timer duration to 40 seconds 2026-02-23 15:25:54 +01:00
library_updater.dart Improve failure message by using itemType.name 2026-02-22 14:45:01 +01:00
m_extension_server.dart feat(server): add server check before starting 2025-12-10 13:38:15 +01:00
recommendation.dart added Anibrain recommendations 2025-08-15 21:42:47 +02:00
search.dart Add IsolateService for improved asynchronous operations and refactor service calls to utilize it 2025-11-07 16:48:42 +01:00
search.g.dart update dependencies & update riverpod provider declarations 2026-01-08 14:27:08 +01:00
search_.dart Add IsolateService for improved asynchronous operations and refactor service calls to utilize it 2025-11-07 16:48:42 +01:00
search_.g.dart update dependencies & update riverpod provider declarations 2026-01-08 14:27:08 +01:00
supports_latest.dart Add service disposal and lifecycle cleanup 2026-01-13 01:11:19 +01:00
supports_latest.g.dart Refactor 2026-03-02 11:49:19 +01:00
sync_server.dart Add keepAlive calls in Synching and SyncServer build methods 2025-11-08 22:04:57 +01:00
sync_server.g.dart update dependencies & update riverpod provider declarations 2026-01-08 14:27:08 +01:00
torrent_server.dart added sync for settings 2025-07-21 23:37:51 +02:00