RiotSharp icon indicating copy to clipboard operation
RiotSharp copied to clipboard

Usage In Blazor WASM

Open thompcd opened this issue 3 years ago • 1 comments

Hi! I tried to create a proof of concept using the api within the standard Microsoft Blazor PWA template and receive a CORS exception when trying to fetch from my index component.

Are there any examples of using this within a Blazor web assembly app? It looks like there are workarounds using proxies, would like to know if this has been done already.

Thanks!

thompcd avatar Mar 14 '21 12:03 thompcd

It's certainly only possible using a proxy server, because otherwise you would expose your api key to your users. You could use NGINX to attach the authentication header with your api key to the proxied request. Should be very simple to set up.

JanOuborny avatar Mar 14 '21 13:03 JanOuborny