Update: 2026-07-26 02:51:53
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||
import 'package:crypto/crypto.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:http/io_client.dart' as http_io;
|
||||
@@ -25,6 +26,10 @@ class SslPinning {
|
||||
];
|
||||
|
||||
static http.Client createPinnedClient() {
|
||||
if (kIsWeb) {
|
||||
return http.Client();
|
||||
}
|
||||
|
||||
final httpClient = HttpClient()
|
||||
..badCertificateCallback =
|
||||
(X509Certificate cert, String host, int port) {
|
||||
|
||||
Reference in New Issue
Block a user