ElliottLandsborough / dog-ceo-api

The API hosted at dog.ceo
https://dog.ceo/api
631 stars 65 forks source link

404 Errors don't have CORS headers #13

Closed bookcasey closed 5 years ago

bookcasey commented 5 years ago

If you ping an invalid URL, you don't get a 404, you get a CORS error.


fetch('https://dog.ceo/api/breeds/list/x')
  .then(res => res.json())
  .then(data =>console.log(data));;
ElliottLandsborough commented 5 years ago

Thanks for reporting it, and yep, this is another problem with the current (and quite frankly rushed) code base.

I've almost finished doing a rewrite which fixes this issue among other things.

I will update the status here when it is done.

ElliottLandsborough commented 5 years ago

@bookcasey this is fixed, see screenshot:

headers