• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

XMLHttpRequest cannot load <url> due to access control checks [IOS]

New Here ,
Feb 05, 2021 Feb 05, 2021

Copy link to clipboard

Copied

Hello,

I’m trying to make a http request to local network and I received the following error:

 

Preflight response is not successful
XMLHttpRequest cannot load <url> due to access control checks.
Failed to load resource: Preflight response is not successful

 

My request: 

 

axios
 .get('<url>')
 .then(res => {
  console.log(res)
 }).catch((err) => {
  if (err.status === 500) {
   // error
  } else {
   // error
  }
 })

 

I tried to set some headers to this request like Access-Control-Allow-Origin, Access-Control-Allow-Headers, Access-Control-Allow-Methods. Unfortunately it didn’t work.

 

This issue is only in iOS app. In android app or browsers the request works properly.

 

Can anyone help me? Thanks!

Views

1.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 25, 2021 Feb 25, 2021

Copy link to clipboard

Copied

LATEST

Vesselin, which Adobe software or service is your question in relation to?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines