Allow CORS in Net Core application
It's not for production, but for developer environments
Add the block below to Program.cs. I talk about Net Core 5 or Net Core 6 application.
// global cors policy
app.UseCors(x => x
.AllowAnyMethod()
.AllowAnyHeader()
.SetIsOriginAllowed(origin => true) // allow any origin
.AllowCredentials()); // allow credentials

Azure.RequestFailedException when start App in Visual Studio
Determine the first and last days of a quarter with Day.js
Login as another user in SharePoint 2019 on-premises site in Chrome