only fetch supported schemes
This commit is contained in:
@@ -11,11 +11,14 @@ import 'package:weblibre/features/tor/domain/services/tor_proxy.dart';
|
||||
|
||||
part 'website_title.g.dart';
|
||||
|
||||
const _supportedFetchSchemes = {'http', 'https'};
|
||||
|
||||
@Riverpod()
|
||||
class CompletePageInfo extends _$CompletePageInfo {
|
||||
@override
|
||||
AsyncValue<WebPageInfo> build(Uri url, WebPageInfo? cached) {
|
||||
if (cached?.isPageInfoComplete == true) {
|
||||
if (cached?.isPageInfoComplete == true ||
|
||||
!_supportedFetchSchemes.contains(url.scheme)) {
|
||||
return AsyncData(cached!);
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ class _PageInfoProviderElement
|
||||
bool get isImageRequest => (origin as PageInfoProvider).isImageRequest;
|
||||
}
|
||||
|
||||
String _$completePageInfoHash() => r'24dd5e32eac379ae9190de068a674fa1ee485d56';
|
||||
String _$completePageInfoHash() => r'6a258150d2bb72b8f21de973ddcd23734f79ace0';
|
||||
|
||||
abstract class _$CompletePageInfo
|
||||
extends BuildlessAutoDisposeNotifier<AsyncValue<WebPageInfo>> {
|
||||
|
||||
Reference in New Issue
Block a user