Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,158,313 members, 7,836,358 topics. Date: Wednesday, 22 May 2024 at 06:11 AM

Mobile App With Ionic - Cors - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Mobile App With Ionic - Cors (1382 Views)

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)

(1) (Reply)

Mobile App With Ionic - Cors by dplumptre(m): 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)

English Dictionary In Xml/json Format / Photos: World Class Android Music Player Created By A Nairalander / Please, Help Me Out With A Link To Download Laravel 5.3 Pdf Tutorials

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 7
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.