Fix Riot API CORS error (Express Proxy Server / React Tutorial)

preview_player
Показать описание

One of the most common issues with the Riot API is that you are making calls from a web client (causing the CORS error), this tutorial gets you started by creating a proxy server so you can make API calls to the riot / league of legends API like a pro! In this video I use a React frontend, but the proxy server itself should be usable for whatever frontend you determine.

Hey it's Cooper, make sure to subscribe for more full stack development content in the future!

Рекомендации по теме
Комментарии
Автор

holy video, thanks man, i had an issue with cors in a project i didn't even know a thing from express, i've learned a lot, thanks!

bomfanti
Автор

Awesome video! :D I ran into a similar issue while using another public API and this video explains everything. Thank you!

tsaqifammar
Автор

There is still a preflight call happening to the proxy server right?

yashwanthnumburi
Автор

do you mind explaining why're you still using "var" when it states nearly everywhere that it is best practice to use either "let" or "const"?

pawezawadzki
Автор

How can I deploy one of these projects to netlify?

JSingh
Автор

Hi! i have a problem, when i try to start npm ( npm start) its ocurriyng a error:

"[nodemon] app crashed - waiting for file changes before starting..."

can u help me?

diegoroman
Автор

at 22:10 when i press the button to see the 5 games my console juste write 2 times Array[ ] with nothing more. Do you have an idea of where the problem can be ??? Also very nice vids !

tytyuio
Автор

Hello, I don't know why Im not getting the package.json file when executing npm i express cors axios

azizdeghais
Автор

i have axios error but when i just past this api on google then work great

ItsMeStachu
Автор

when I make the API call to my proxy server I don't get back data from Riot I get empty objects in my array. Any ideas why?

ken
Автор

bro uploaad advance topic . like integrating ci cd rabbitmq kafka aws with react or react native

arupde
Автор

My response.data from getPlayerPUUID is returning undefined. Not sure what to do. I am able to hardcode a PUUID in for the " + {PUUID} " and it works great.

Otherwise puuid looks like this "[object%20Object]"

dakotavorbroker
join shbcf.ru