1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-25 14:29:22 +00:00
comunicmobile/lib/main_dev.dart

33 lines
736 B
Dart
Raw Permalink Normal View History

2020-04-15 09:13:39 +00:00
import 'dart:io';
import 'package:comunic/main.dart';
import 'package:comunic/models/config.dart';
/// Dev (internal) build configuration for the project
///
/// @author Pierre HUBERT
2020-04-15 09:13:39 +00:00
/// Fix HTTPS issue
class MyHttpOverride extends HttpOverrides {
@override
HttpClient createHttpClient(SecurityContext context) {
return super.createHttpClient(context)
..badCertificateCallback = (cert, host, port) {
return host == "devweb.local"; // Forcefully trust local website
};
}
}
void main() {
Config.set(Config(
2020-03-30 20:43:46 +00:00
apiServerName: "192.168.1.9:3000",
apiServerUri: "/",
apiServerSecure: false,
2021-02-13 15:03:07 +00:00
clientName: "ComunicFlutter",
));
2020-04-15 09:13:39 +00:00
HttpOverrides.global = new MyHttpOverride();
subMain();
}