I am developing an Ionic (v5) mobile app that uses the Cordova Oracle Mobile Cloud SDK. However, there is an issue with making HTTPS requests to the Oracle Mobile Hub - it’s the familiar CORS issue. However, because mobile client requests can come from any domain/IP range, it doesn’t seem possible to add a CORS whitelist to the Mobile Hub server. I tried adding the Access-Control-Allow-Origin headers to my server request code on the server (node.js) but the issue occurs at the authentication stage, before the requests even hit my node.js code. The solution is to add a CORS whitelist to the server environment, but as already mentioned, there’s no set domains where requests can come from.
With all that in mind, I have been looking at Capacitor as a possible solution by installing the Android Oracle Mobile Cloud SDK. Would this circumvent the problems of the request coming from a webview? There’s a note on the Capacitor docs under Android Development, which states the following:
Also, Capacitor requires an Android WebView with Chrome version 50 or later. On Android 5 and 6, the Capacitor uses the System WebView. On Android 7+, Google Chrome is used.
I’m not sure how to interpret that. Any help much appreciated.