Home  >  Q&A  >  body text

javascript - React with fetch error reporting problem

I was doing a test, and then used fetch to make the interface, and then an error was reported. . . .

#There is definitely a request on the backend. It seems to be a cross-domain problem. Please find a solution! Thanks.

巴扎黑巴扎黑2712 days ago479

reply all(1)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-17 10:08:21

    It’s a cross-domain issue. If this is just a development environment and you want to deploy it to the server in the future, you can just set the chrome browser to allow cross-domain --disable-web-security --user-data-dir right-click shortcut Method, add this after the target.
    If not, ask the backend to open a cross-domain one for you

    Open this picture and you’ll be good to go

    reply
    0
  • Cancelreply