Compare commits
1 Commits
experiment
...
auth-certi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0939d4c0d1 |
@@ -1,6 +1,7 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:dio/io.dart';
|
||||||
import 'package:ente_auth/core/configuration.dart';
|
import 'package:ente_auth/core/configuration.dart';
|
||||||
import 'package:ente_auth/core/event_bus.dart';
|
import 'package:ente_auth/core/event_bus.dart';
|
||||||
import 'package:ente_auth/events/endpoint_updated_event.dart';
|
import 'package:ente_auth/events/endpoint_updated_event.dart';
|
||||||
@@ -36,6 +37,11 @@ class Network {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
(_dio.httpClientAdapter as IOHttpClientAdapter).createHttpClient = () =>
|
||||||
|
HttpClient()
|
||||||
|
..badCertificateCallback =
|
||||||
|
(X509Certificate cert, String host, int port) => true;
|
||||||
|
|
||||||
_enteDio = Dio(
|
_enteDio = Dio(
|
||||||
BaseOptions(
|
BaseOptions(
|
||||||
baseUrl: endpoint,
|
baseUrl: endpoint,
|
||||||
@@ -50,6 +56,11 @@ class Network {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
(_enteDio.httpClientAdapter as IOHttpClientAdapter).createHttpClient = () =>
|
||||||
|
HttpClient()
|
||||||
|
..badCertificateCallback =
|
||||||
|
(X509Certificate cert, String host, int port) => true;
|
||||||
|
|
||||||
_setupInterceptors(endpoint);
|
_setupInterceptors(endpoint);
|
||||||
|
|
||||||
Bus.instance.on<EndpointUpdatedEvent>().listen((event) {
|
Bus.instance.on<EndpointUpdatedEvent>().listen((event) {
|
||||||
|
|||||||
Reference in New Issue
Block a user