ASP & ASP.NET Tutorial Series (172/247). Prefer one article? Read the complete ASP.NET tutorial.
Short description
Avoid AllowAnyOrigin with credentials.
CORS
builder.Services.AddCors(o => o.AddPolicy("Spa", p =>
p.WithOrigins("https://app.example.com").AllowAnyHeader().AllowAnyMethod()));
app.UseCors("Spa");