Reland "Pass platform configuration to Dart VM for insecure socket policy (#20733)"

This reverts commit cc5fef5f32.
This commit is contained in:
Mehmet Fidanboylu
2020-08-27 14:23:31 -07:00
committed by GitHub
parent 584413de81
commit b237cb1c9c
2 changed files with 3 additions and 10 deletions

View File

@@ -216,10 +216,9 @@ public class FlutterLoader {
}
shellArgs.add("--cache-dir-path=" + result.engineCachesPath);
// TODO(mehmetf): Announce this since it is a breaking change then enable it.
// if (!flutterApplicationInfo.clearTextPermitted) {
// shellArgs.add("--disallow-insecure-connections");
// }
if (!flutterApplicationInfo.clearTextPermitted) {
shellArgs.add("--disallow-insecure-connections");
}
if (flutterApplicationInfo.domainNetworkPolicy != null) {
shellArgs.add("--domain-network-policy=" + flutterApplicationInfo.domainNetworkPolicy);
}

View File

@@ -140,12 +140,6 @@ static flutter::Settings DefaultSettingsForProcess(NSBundle* bundle = nil) {
settings.domain_network_policy =
[FlutterDartProject domainNetworkPolicy:appTransportSecurity].UTF8String;
// TODO(mehmetf): We need to announce this change since it is breaking.
// Remove these two lines after we announce and we know which release this is
// going to be part of.
settings.may_insecurely_connect_to_all_domains = true;
settings.domain_network_policy = "";
#if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG
// There are no ownership concerns here as all mappings are owned by the
// embedder and not the engine.