Mobile App With Ionic - Cors - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › Mobile App With Ionic - Cors (1477 Views)
1 Reply
| Mobile App With Ionic - Cors by dplumptre(op): 11:40am On Dec 18, 2015 |
Hi guys, For all of you that experiencing this error below when you are trying to do a $http get request XMLHttpRequest cannot load http://domainWhereTheGetRequest No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access. The issue for this is CORS "Cross-origin resource sharing" is a mechanism that allows restricted resources so Since CORS is only an issue when running your app in development mode with ionic serve, and not when running as a mobile app packaged with Cordova, a simpler option is to just disable CORS altogether for local development. For Chrome for example there's a plugin called "Allow-Control-Allow-Origin: *" that lets you disable CORS. here is the url below https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi you can read some other topics by visiting my blog below blog : http://overallheuristic.com/blog site : http://overallheuristic.com twitter : @dplumptre fb :https://www.facebook.com/
|
Cost Of Building An App With More Features Than Uber • Get Started With Ionic 2 – Tutsplus • Ionic: Back Button Not Working On Side-menu Template • 2 • 3 • 4
Please Help, I Want To Learn To Build Websites, Web Design... • The Nairaland Bug • Top 10 Best Linux OS For Penetration Testing, Security Or Hacking