Skip to content

Commit

Permalink
Pass platform configuration to Dart VM for insecure socket policy (fl…
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetf authored Aug 25, 2020
1 parent 57fdf0a commit d241105
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,9 @@ public void ensureInitializationComplete(
}

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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,6 @@
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.
Expand Down

0 comments on commit d241105

Please sign in to comment.