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 людям.