php - Cordova WhiteList does not allow access to my Server -


i can not connect database because url rejected. url want access this:

http://192.168.0.16/checkuser.php?nombre=asi&clave=1234

i have urls same structure, , have tried in config.xml file did not worked.

<access origin="*" /> <access origin="http://192.168.0.16" subdomains="true" /> 

or

<access origin="http://192.168.0.16/*"/> 

this complete code create path , call functions connect database:

function pulluser(username,apodo,secondname,lastname,pass1,usermail){     var method='get';     var url = appconstants.requestpulluserurl();     //alert('cogidaurl: '+ url);     var path = url + "?nombre="+username+"&apodo="+apodo+"&apellido1="+secondname+     "&apellido2="+lastname+"&email="+usermail+"&clave="+pass1;     console.log(path);     //alert('el path es: '+ path);     var xhr = new xmlhttprequest();      xhr.onreadystatechange = function(){         //alert('onready. readystate:'+xhr.readystate+' status: '+xhr.status);         if(xhr.readystate == 4 && xhr.status == 200){             resp = xhr.responsetext;             //alert('registro completado');             transitionlog();             }else{                 //alert('devuelve false');                 return false;              }     }     xhr.open(method, path, true); //creamos la peticion     resp = xhr.send(); // falla aqui sin server     alert('despues del send'); } 

thanks.

i solved it, adding whitelist pluggin. don´t know why when created project did not added itself. bash code on app directory solved it: cordova plugin add https://github.com/apache/cordova-plugin-whitelist.git


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -