₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,611 members, 8,422,832 topics. Date: Monday, 08 June 2026 at 09:15 PM

Toggle theme

Mobile App With Ionic - Cors - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingMobile 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/

1 Reply

Cost Of Building An App With More Features Than UberGet Started With Ionic 2 – TutsplusIonic: Back Button Not Working On Side-menu Template234

Please Help, I Want To Learn To Build Websites, Web Design...The Nairaland BugTop 10 Best Linux OS For Penetration Testing, Security Or Hacking