ionic-team / cordova-plugin-ionic-webview

Web View plugin for Cordova, specialized for Ionic apps.
Apache License 2.0
484 stars 391 forks source link

Cordova 10 CORS policy error. #655

Open nishu0808 opened 2 years ago

nishu0808 commented 2 years ago

I am upgrading the app from cordova 9 to 10. In cordova 10, whitelist plugin is not supported. Also I am unable to change hostname in client side. I am getting the following error.

Access to XMLHttpRequest at "url" from origin 'https://localhost' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header has a value 'url' that is not equal to the supplied origin."

Kindly provide client side solution as backend changes are avoided due to security reasons.

orjandh commented 2 years ago

I am also experiencing this issue. I am staying on cordova-android 9 and cordova-plugin-whitelist 1.3.4 until there is a solution.