No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

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

    Help
    2
    2
    787
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      vesko last edited by

      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!

      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @vesko last edited by

        @vesko

        So you are you using cordova or capacitor for you IOS App?

        1 Reply Last reply Reply Quote 0
        • First post
          Last post