How to Fix iOS 12 Safari Cors Preflight Error

How to fix iOS 12 Safari Cors preflight error?

It's a bug in iOSv12, but it's already fixed in iOSv12.1 beta (16B5059d), assuming the current beta code makes it into production.

The problem is that iOSv12 WebKit preflight OPTIONS calls don't leave the device. I've run WireShark and the iOSv12 simulator to confirm this.

False CORS failure only in iOS mobile safari when uploading images

You're right, the CORS error message is very misleading. I've been struggling with the exact same issue for the past couple of days and it turned out the image I was trying to upload from my phone was too large for the app server I'm using which is nginx on Kubernetes; so the fix which works for me is to just add this annotation to the ingress configuration

nginx.ingress.kubernetes.io/proxy-body-size: "0"

to removes any restriction on upload size.

413 Request Entity Too Large

Preflight error when using Authorization header on iOS 15.5/Xcode - Cordova-ios@6.1.1

It's because there is no origin on WKWebView so the Preflight will fail. Did you set any origin and scheme in your config.xml ?

 <preference name="scheme" value="app" />
<preference name="hostname" value="localhost" />

You can also try https://github.com/globules-io/cordova-plugin-ios-xhr



Related Topics



Leave a reply



Submit