'Does Capacitor can use UIWebview or call Server's API without CORS?

Many years ago, we developed an app with angular+ionic+cordova, we use UIWebView to solve the CORS problem. Now we want to develop a new app with angular+material+capacitor, but we meet the problem of CORS. If we can't change Serve's API to allow CORS, can we solve this problem just by changing the front's app? Such as referring to UIWebview or any other ways?

Thanks!



Solution 1:[1]

You can bypass CORS with the Capacitor Community HTTP Plugin. Here you can find the official guide: https://capacitorjs.com/blog/bypassing-cors-with-the-http-plugin

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 RGe