|
@@ -38,7 +38,7 @@ namespace MySystem
|
|
|
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
|
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
|
|
services.Configure<Setting>(Configuration.GetSection("Setting"));
|
|
services.Configure<Setting>(Configuration.GetSection("Setting"));
|
|
|
// 测试完成后必须注释掉
|
|
// 测试完成后必须注释掉
|
|
|
- // services.AddCors(option => option.AddPolicy("cors", policy => policy.AllowAnyHeader().AllowAnyMethod().AllowCredentials().SetIsOriginAllowed(_ => true)));//是否允许跨域
|
|
|
|
|
|
|
+ services.AddCors(option => option.AddPolicy("cors", policy => policy.AllowAnyHeader().AllowAnyMethod().AllowCredentials().SetIsOriginAllowed(_ => true)));//是否允许跨域
|
|
|
// 测试完成后必须注释掉
|
|
// 测试完成后必须注释掉
|
|
|
services.Configure<KestrelServerOptions>(x => x.AllowSynchronousIO = true).Configure<IISServerOptions>(x => x.AllowSynchronousIO = true);
|
|
services.Configure<KestrelServerOptions>(x => x.AllowSynchronousIO = true).Configure<IISServerOptions>(x => x.AllowSynchronousIO = true);
|
|
|
services.AddMvc(options =>
|
|
services.AddMvc(options =>
|