Fixed CORS problems and No Access-Control-Allow-Origin header errors with Ionic.
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access.
Add these 4 line codes in your header of the PHP file.
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST ,OPTIONS, PUT');
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
header('Content-Type: application/json');
If Still issue comes then you need to use Advanced Http Cordova Plugin
https://ionicframework.com/docs/nativ...
🔥 TMD Hosting Affiliate
Get 40% OFF on Website Hosting and other Plans https://mywebhostguru.com/tmdhosting
🔥 DIGITAL OCEAN HOSTING Offer
Get $200 in credit for 60 days https://m.do.co/c/8e44c23bdd22
🔥 Hostinger Hosting Offers
https://bit.ly/3GlVbLB
Stay Connected With Us:
Website: https://mywebhostguru.com/
Facebook: / webhostguru
/ mauryavijay91
#cors
Watch video [Solved] CORS problems and No Access-Control-Allow-Origin header errors with Ionic online, duration hours minute second in high quality that is uploaded to the channel Coder Jay 29 November 2018. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 11,624 times and liked it 43 visitors.