Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage In Blazor WASM #682

Open
thompcd opened this issue Mar 14, 2021 · 1 comment
Open

Usage In Blazor WASM #682

thompcd opened this issue Mar 14, 2021 · 1 comment

Comments

@thompcd
Copy link

thompcd commented Mar 14, 2021

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!

@JanOuborny
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants