1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-12-27 05:18:50 +00:00
comunicmobile/lib/main_dev.dart
2020-04-15 11:13:39 +02:00

35 lines
884 B
Dart

import 'dart:io';
import 'package:comunic/main.dart';
import 'package:comunic/models/config.dart';
/// Dev (internal) build configuration for the project
///
/// @author Pierre HUBERT
/// 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(
apiServerName: "192.168.1.9:3000",
apiServerUri: "/",
apiServerSecure: false,
serviceName: "ComunicFlutter",
serviceToken: "G9sZCBmb3IgVWJ1bnR1CkNvbW1lbnRbbmVdPeCkieCkrOCkq",
termsOfServicesURL: "http://devweb.local/comunic/current/about.php?cgu",
));
HttpOverrides.global = new MyHttpOverride();
subMain();
}