javascript - ionic cross domain issue -
hi guys using node server data fetch , and client side ionic framework android application(phonegap).
so in computer browser hit localhost:8080/sessions (or 10.129.86.47:8080/sessions) return json server side,but when run ionic application in android device apk not hit server because of cross domain.
my server , client application both in same network.
i fond 2 3 solution not work me
solution tried as:
1) first tried ionic proxy, set proxy ionic hit proxy url wont work. example : in ionic.project file entered proxy
{ "name": "proxy-example", "app_id": "", "proxies": [ { "path": "/sessions", "proxyurl": "http://10.129.86.47:8080/sessions" } ] } 2) second tried whitelist example :
<access origin="http://google.com" /> <access origin="https://google.com" /> <access origin="*" /> <!-- don't block requests --> if use * means don't block requests wont work me
as know when phonegap android application hit service hit url file://and ....... not hit server form application cordova allows cross domain request default me wont work.
Comments
Post a Comment