Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13639

The fetch request has a cross-origin problem

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • None
    • None
      1. cordova6/cordova7
      2. 华为(HUAWEI)畅享5S Android5.1.1

    Description

      I used [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) to request a service,report "...cross-origin..." problem. And then I try to use Ajax or XMLHttpRequest to request the same service,there's no problem.

      a part of the content in my config.xml,

      
      <access origin="*">
      
      <allow-navigation href="http://*/*" />
      <allow-navigation href="https://*/*" />
      <allow-navigation href="data:*" />
      

      Cordova is not good for the fetch request?

      Attachments

        Activity

          People

            Unassigned Unassigned
            laishuliang Lorcan Lai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: