app.UseCors(builder =>
{
var cors = Configuration.GetSection("CorsOrigins");
if(cors!=null)
{
builder.WithOrigins(cors.Value.Split(','))//�����������ʵ���
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials();
}
else
{
builder.AllowAnyOrigin() //�����κ���Դ����������
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials();
}
});