-3

I find myself facing a problem ... Indeed, I would like to run this code (js):

fetch('https://j0ke.xyz/free/api/garsvsfilles')
     .then(res => { return res.json() })
     .then(data => {
        console.log(data)
})

But, I am getting several errors in the browser console:

https://i.stack.imgur.com/AarVs.png

If anyone could help me solve this problem, I would appreciate it.

Yaniv
  • 1

1 Answers1

-1

Hey the CORS error is a pretty weird thing, which prevents you to fetch from a browser to another ip address, you need to add cors on your backend server, please share the backend code with us, so we can improve it to use cors :)

Laurenz1606
  • 88
  • 13