Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Ban HTTP by default on iOS and Android #17657

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ public void ensureInitializationComplete(
if (settings.getLogTag() != null) {
shellArgs.add("--log-tag=" + settings.getLogTag());
}
// On Android, we ban HTTP connections by default.
shellArgs.add("--disable-http");

String appStoragePath = PathUtils.getFilesDir(applicationContext);
String engineCachesPath = PathUtils.getCacheDirectory(applicationContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@
}
}

// On iOS, we ban HTTP by default.
settings.disable_http = true;

#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