Ionic - Cross-Origin Request Blocked Issue Ionic - Cross-Origin Request Blocked Issue angularjs angularjs

Ionic - Cross-Origin Request Blocked Issue


The cross origin is forced by your browser, running the application from any distributed phone should not be blocked with your current settings.

To allow communication between your "served to browser" app to your server use a browser plugin

Allow-Control-Allow-Origin: * Chrome Plugin do the work


I have changed the .htaccess files as below and its worked out, Google Chrome is not accepting the '*', so I specified the exact URL

Header set Access-Control-Allow-Origin "http://localhost:8100"Header set Access-Control-Allow-Credentials: true


While I don't have experience using Zend with Ionic, I did experience this issue when interfacing with an IIS hosted REST API via Ionic.

For me, I had to add "Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS" server side in addition to what you already have.

After adding the 'allow methods' header, I was able to fully utilize my API.

If this doesn't get it for you, report back and I will dig a bit deeper in my project to see if I've forgotten a client side change that were also required.