Hello. im having problem deploying my Ionic project as PWA(Browser). after i build my project using
‘ionic crodova build browser --prod --release’ and deploy it on my server i’m having CORS issues… can someone help me? thanks
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 1.3.8
Cordova Platforms : android 6.2.3 browser 4.1.0
Ionic Framework : ionic-angular 3.4.2
System:
Node : v6.11.1
OS : Windows 10
npm : 3.10.10
Yes: Fix the CORS issues.
Serious: What errors? Where? With what error messages? By what code?
here’s the error
XMLHttpRequest cannot load https://myserver.com. Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘https://www.myser.com’ is therefore not allowed access. The response had HTTP status code 401.
eventhough i already deploy it on my production server
Make your server respond to the preflight with the correct header.
How and where are you testing your app?