1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-23 05:19:22 +00:00
comunicmobile/lib/forez/main_forez_dev.dart

34 lines
763 B
Dart
Raw Normal View History

2021-04-23 10:13:39 +00:00
import 'dart:io';
import 'package:comunic/forez/init.dart';
2021-04-23 10:13:39 +00:00
import 'package:comunic/main.dart';
import 'package:comunic/models/config.dart';
/// Forez development configuration
///
/// @author Pierre Hubert
/// Fix HTTPS issue
class MyHttpOverride extends HttpOverrides {
@override
HttpClient createHttpClient(SecurityContext? context) {
2021-04-23 10:13:39 +00:00
return super.createHttpClient(context)
..badCertificateCallback = (cert, host, port) {
return host == "devweb.local"; // Forcefully trust local website
};
}
}
void main() {
Config.set(ForezConfig(
2021-04-23 10:13:39 +00:00
apiServerName: "192.168.1.9:3000",
apiServerUri: "/",
apiServerSecure: false,
clientName: "ForezFlutter",
));
HttpOverrides.global = new MyHttpOverride();
subMain();
}