4
0
mirror of https://github.com/apache/cordova-android.git synced 2025-04-01 12:22:41 +08:00

fix(AllowListPlugin): Safely handle default allow navigation policy in allow request ()

This commit is contained in:
Joel Skrepnek 2021-09-08 22:58:58 -07:00 committed by GitHub
parent 7a67e00b9f
commit aea6b7f6f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -122,7 +122,7 @@ public class AllowListPlugin extends CordovaPlugin {
@Override
public Boolean shouldAllowRequest(String url) {
return (this.shouldAllowNavigation(url) || this.allowedRequests.isUrlAllowListed(url))
return (Boolean.TRUE.equals(this.shouldAllowNavigation(url)) || this.allowedRequests.isUrlAllowListed(url))
? true
: null; // default policy
}