Ionic Woocommerce Create user CORS issue


#1

I want to create new user using ionic app consuming woocomerce api, if i create user in chrome by disabling security it works fine but when i build on real device it returns error.

my code->

this.Woocommerce=WC({
url:“http://matrixherbalremedies.com”,
consumerKey:“ck###############################”,
consumerSecret:“cs_##########################”
})

this.Woocommerce.postAsync(“customers”,customerData).then((data)=>
{

  let response = (JSON.parse(data.body));
  console.log(response);

  if(response.customer){
    this.alertCtrl.create({
      title: "Account Created",
      message: "Your account has been created successfully! Please login to proceed.",
      buttons: [{
        text: "Login",
        handler: ()=> {
          this.navCtrl.push(LoginPage)
        }
      }]
    }).present();
  } else if(response.errors){
    this.toastCtrl.create({
      message: response.errors[0].message,
      showCloseButton: true
    }).present();
  }
  })

}