Skip to content

Commit

Permalink
Check assetloader flag
Browse files Browse the repository at this point in the history
See #1222
  • Loading branch information
NiklasMerz committed Jul 14, 2021
1 parent b75bc89 commit 7f5fbad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion framework/src/org/apache/cordova/AllowListPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ public void handleStartTag(XmlPullParser xml) {
allowedNavigations.addAllowListEntry(startPage, false);

// Allow origin for WebViewAssetLoader
allowedNavigations.addAllowListEntry("https://" + this.prefs.getString("hostname", "localhost") + "/" + startPage, false);
if (!this.prefs.getBoolean("AndroidInsecureFileModeEnabled", false)) {
allowedNavigations.addAllowListEntry("https://" + this.prefs.getString("hostname", "localhost"), false);
}
} else if (strNode.equals("allow-navigation")) {
String origin = xml.getAttributeValue(null, "href");
if ("*".equals(origin)) {
Expand Down

0 comments on commit 7f5fbad

Please sign in to comment.