0

I'm learning vue and I'm experimenting with API calls with axios to my local django server. Therefore I encountered CORS errors. I already know how CORS works and why it is blocking my calls, however when I try to send a call to this fake API for testing, it works flawlessly. How is cors allowing it?

Here's an example code:

axios.get('https://localhost:8000/api/posts')
.then( () => console.log('Local server working :)'))

axios.get('https://jsonplaceholder.typicode.com/todos')
.then( () => console.log('Fake api working :)'))

Result:

enter image description here

Freder
  • 51
  • 1
  • 5

1 Answers1

0

The server answers with CORS related headers.

enter image description here

Gordon Freeman
  • 3,260
  • 1
  • 22
  • 42