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
Смотрите видео [Solved] CORS problems and No Access-Control-Allow-Origin header errors with Ionic онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Coder Jay 29 Ноябрь 2018. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 11,624 раз и оно понравилось 43 посетителям.