默认跨域
services.AddCors(options => { options.AddDefaultPolicy( builder => { builder.WithOrigins("http://localhost:59099/", "http://www.contoso.com"); }); });
app.UseCors();