CORS Policy with WASM

Balu Raju 76 Reputation points

What is the requirement to have Blazor WASM call Web API hosted on the web server.
I have Web API hosted already on the web server which is good with Blazor server app,
Now I have the same service called by Blazor WASM, i get teh following error
"has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled."

what are the steps I need to take to resolve the issue? documentation is very sparse

A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,373 questions
{count} votes