From f64b4c0b3393c7e8b5a683c868ca961029041a80 Mon Sep 17 00:00:00 2001 From: office-pc nix root Date: Mon, 23 Dec 2024 16:10:07 +0800 Subject: [PATCH] add bundle id in user agent --- lib/http_overrides.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/http_overrides.dart b/lib/http_overrides.dart index aefa5df4..72d24033 100644 --- a/lib/http_overrides.dart +++ b/lib/http_overrides.dart @@ -7,7 +7,8 @@ class MyHttpOverrides extends HttpOverrides { @override HttpClient createHttpClient(SecurityContext? context) { return super.createHttpClient(context) - ..userAgent = 'Clipious/${packageInfo?.version ?? '0.0.0'}' + ..userAgent = + 'Clipious/${packageInfo?.version ?? '0.0.0'} (${packageInfo?.packageName ?? ''})' ..badCertificateCallback = (X509Certificate cert, String host, int port) { // if true, it will allow all certs, if false it will throw error on a bad cert return db.getSettings(skipSslVerificationSettingName)?.value == 'true';