Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): load local assets when using wildcard on allowNavigation #3834

Merged
merged 3 commits into from
Nov 23, 2020

Conversation

jcesarmobile
Copy link
Member

if using

"server": {
  "allowNavigation": [
    "*"
  ]
}

The app fails to load the local content

closes #3809

@@ -172,7 +172,7 @@ public WebResourceResponse shouldInterceptRequest(WebResourceRequest request) {
return null;
}

if (isLocalFile(loadingUrl) || (bridge.getConfig().getString("server.url") == null && !bridge.getAppAllowNavigationMask().matches(loadingUrl.getHost()))) {
if (isLocalFile(loadingUrl) || loadingUrl.getHost().contains(bridge.getHost()) || (bridge.getServerUrl() == null && !bridge.getAppAllowNavigationMask().matches(loadingUrl.getHost()))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this incorrectly trigger if loadingUrl.getHost() = "something.app" and bridge.getHost() = "app"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed the contains to equalsIgnoreCase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants