CORS in ASP.NET Core: Allow Localhost, All Origins and Fix “Blocked by CORS Policy”
Your page on localhost:5884 calls your API on localhost:5881, curl gets a 200 from the same URL, and the browser console still says this: The fix is an ASP.NET Core CORS policy: list the front end’s exact origin with AddCors, then switch it on with UseCors: I ran every policy below on .NET 10 against … Read more >>