₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,344,837 members, 8,513,933 topics. Date: Thursday, 05 November 2026 at 06:54 PM

Toggle theme

Mobile App With Ionic - Cors - Programming - Nairaland

Nairaland Forum › Science/Technology › Programming › Mobile App With Ionic - Cors (1513 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 Uber • Get Started With Ionic 2 – Tutsplus • Ionic: Back Button Not Working On Side-menu Template • 2 • 3 • 4

English Dictionary In Xml/json Format • Vacancy - PHP Application Developer • ICT Training Manual For Primary School And Secondary Schools