Phonegap for Android access origin to allow only certain domains.

40 views
Skip to first unread message

Oleg Khorev

unread,
Sep 13, 2016, 11:19:28 AM9/13/16
to phonegap

Phonegap for Android I set to allow specified domains only. But it does not restrict other.

 

 

I set config.xml

    <plugin name="cordova-plugin-whitelist" spec="https://github.com/apache/cordova-plugin-whitelist.git" />



   
<allow-navigation href="http://domain.net/*" />

   
<access origin="http://domain.net" browserOnly="true" />



 

 

But webview still can open other domains.


It works well on iOS but not in Android. Any ideas?

Thank you.

jcesarmobile

unread,
Sep 16, 2016, 7:37:47 AM9/16/16
to phonegap
When something doesn't work on a platform, but works on another is usually a bug.

Search on http://issues.cordova.io/ because it was maybe reported, if not, create a new issue providing all the information you can.

BTW, how are you navigating to other domains? if using an iframe I think that is already reported.

Oleg Khorev

unread,
Sep 17, 2016, 5:25:54 AM9/17/16
to phonegap
I posted two bugs here
https://issues.apache.org/jira/browse/CB-11841

Hope they will be fixed. Clearing Badge does not work on Android. I am not using iFrames, just web-view or inAppBrowser.

вторник, 13 сентября 2016 г., 19:19:28 UTC+4 пользователь Oleg Khorev написал:

jcesarmobile

unread,
Sep 19, 2016, 3:30:19 AM9/19/16
to phonegap
I have closed the badge issue because that is not a Cordova issue.
About the other one, can you provide more information? It's still not clear to me. Can you provide examples of how do you navigate to another pages?
FYI, inAppBrowser is not affected by the whitelist.
Reply all
Reply to author
Forward
0 new messages