CORS Policy

Rules for which other websites may call your API from a browser.

What is CORS Policy?

A CORS policy says which other websites may call your API from the browser, with which methods and headers.

builder.Services.AddCors(o => o.AddDefaultPolicy(p =>
    p.WithOrigins("https://www.example.com").AllowAnyHeader().AllowAnyMethod()));
...
app.UseCors();

Level: Journeyman · More ASP.NET Core terms at this level

Updated