iOS11 causing CORS Issues in all mobile browsers

后端 未结 5 454
小鲜肉
小鲜肉 2020-12-05 19:40

We were testing our website on iOS devices with iOS11, and noticed that it was breaking, as the browser would not accept responses from our API. Using the remote debugger, w

5条回答
  •  暖寄归人
    2020-12-05 19:57

    In our case, we were able to solve the problem by adding additional http header information when making an OPTIONS preflight request from our API. It appears that Safari does not like wild cards entries in CORS requests, and additionally, needs every header specified in the Access-Control-Allow-Header value, even 'standard' ones that would not be necessary in other browsers. By adding the following headers to all preflight requests, we were able to get X-Domain requests between our site and our api working again.

      
    
        
        
        
    

提交回复
热议问题