Hi! I've used PokeAPI in my React.js pure client-side app [repo],
any API calls fail because it still missing CORS header,
although I've been set a user agent header { 'User-Agent': 'cheese' },
any workarounds?
SOLVED: cloudflare messes up the request.
-
Try add a slash to the end of the request - http://pokeapi.co/api/v2/
-
Try change API endpoints from http://pokeapi.co/api/v2 to http://pokeapi.salestock.net/api/v2
It works! 🎉 🎉 🎉
-
Or as a temporary remedy, you can try cors.now.sh
https://cors.now.sh/https://pokeapi.co/api/v2/
Hi! I've used PokeAPI in my React.js pure client-side app [repo],
any API calls fail because it still missing CORS header,
although I've been set a user agent header
{ 'User-Agent': 'cheese' },any workarounds?
SOLVED: cloudflare messes up the request.
Try add a slash to the end of the request -
http://pokeapi.co/api/v2/Try change API endpoints from http://pokeapi.co/api/v2 to http://pokeapi.salestock.net/api/v2
It works! 🎉 🎉 🎉
Or as a temporary remedy, you can try cors.now.sh
https://cors.now.sh/https://pokeapi.co/api/v2/