ionic-team / ionic-v1

The repo for Ionic 1.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
193 stars 187 forks source link

Request header field Authorization is not allowed by Access-Control-Allow-Headers ionic V1 ios 11 #411

Open pmd23 opened 4 years ago

pmd23 commented 4 years ago

I have migrate my IOS ionic v1 app to IOS 13 and xcode 11.5. when I install the app and try to login first time then I am able to login successfully. But when I kill the app and try to open the app then it wont allow me to auto login.

In the config.xml have added these settings

<preference name="WKSuspendInBackground" value="false" />
<preference name="iosScheme" value="httpsionic" />
<allow-navigation href="httpsionic://*" />
<allow-navigation href="http://localhost:8100/*" />

when i try to open the app after killing the app from task manager. it wont allow me to login. Its giving me an error

Request header field Authorization is not allowed by Access-Control-Allow-Headers.

First Time run when I install the app work as expected :-

Screen Shot 2020-07-17 at 7 22 18 PM

after killing the app and open it again :-

Screen Shot 2020-07-17 at 7 07 37 PM

this is the console log

Screen Shot 2020-07-17 at 7 30 40 PM

Please let me know what I am missing something here so that access the app without this above CORS error. this is my ionic info

Ionic:
   Ionic CLI         : 5.3.0
   Ionic Framework   : ionic1 1.2.4
   @ionic/v1-toolkit : 2.0.11

Cordova:
   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : ios 5.1.1
   Cordova Plugins   : cordova-plugin-ionic-webview 5.0.0, (and 18 other plugins)

Utility:
   cordova-res : not installed
   native-run  : 0.2.8 (update available: 1.0.0)

System:
   ios-deploy : 1.9.0
   ios-sim    : 8.0.2
   NodeJS     : v10.16.3 (/usr/local/bin/node)
   npm        : 6.9.0
   OS         : macOS Catalina
   Xcode      : Xcode 11.5 Build version 11E608c
revie commented 4 years ago

I think this belongs in cordova-plugin-ionic-webview

pmd23 commented 4 years ago

I think this belongs in cordova-plugin-ionic-webview

Yes. its related to WebView