mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
chore: remove certificate check for dio
This commit is contained in:
parent
968fd09eb3
commit
95e09ffc94
@ -1,5 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:collection/collection.dart';
|
import 'package:collection/collection.dart';
|
||||||
import 'package:desktop_webview_window/desktop_webview_window.dart';
|
import 'package:desktop_webview_window/desktop_webview_window.dart';
|
||||||
@ -38,15 +39,14 @@ class AuthenticationNotifier extends AsyncNotifier<AuthenticationTableData?> {
|
|||||||
..httpClientAdapter = Http2Adapter(
|
..httpClientAdapter = Http2Adapter(
|
||||||
ConnectionManager(
|
ConnectionManager(
|
||||||
idleTimeout: const Duration(seconds: 10),
|
idleTimeout: const Duration(seconds: 10),
|
||||||
|
onClientCreate: (uri, clientSettings) {
|
||||||
|
clientSettings.onBadCertificate = (X509Certificate cert) {
|
||||||
|
return uri.host.endsWith("spotify.com");
|
||||||
|
};
|
||||||
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// (dio.httpClientAdapter as IOHttpClientAdapter)
|
|
||||||
// .createHttpClient = () => HttpClient()
|
|
||||||
// ..badCertificateCallback = (X509Certificate cert, String host, int port) {
|
|
||||||
// return host.endsWith("spotify.com") && port == 443;
|
|
||||||
// };
|
|
||||||
|
|
||||||
return dio;
|
return dio;
|
||||||
}();
|
}();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user