routine update

This commit is contained in:
yubaolee 2024-11-29 17:34:53 +08:00
parent 50a848e2af
commit 495e076dc1
2 changed files with 2 additions and 5 deletions

View File

@ -6,7 +6,6 @@ using Infrastructure.Extensions.AutofacManager;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
@ -70,7 +69,7 @@ namespace OpenAuth.Mvc
{ {
// This lambda determines whether user consent for non-essential cookies is needed for a given request. // This lambda determines whether user consent for non-essential cookies is needed for a given request.
//关闭GDPR规范 //关闭GDPR规范
options.CheckConsentNeeded = context => false; options.CheckConsentNeeded = (HttpContext context) => false;
options.MinimumSameSitePolicy = SameSiteMode.None; options.MinimumSameSitePolicy = SameSiteMode.None;
}); });
@ -100,7 +99,6 @@ namespace OpenAuth.Mvc
services.AddHttpClient(); services.AddHttpClient();
services.AddDataProtection().PersistKeysToFileSystem(new DirectoryInfo(Configuration["DataProtection"])); services.AddDataProtection().PersistKeysToFileSystem(new DirectoryInfo(Configuration["DataProtection"]));
var sqlsugarTypes = UtilMethods.EnumToDictionary<SqlSugar.DbType>(); var sqlsugarTypes = UtilMethods.EnumToDictionary<SqlSugar.DbType>();
var dbType = sqlsugarTypes.FirstOrDefault(it => var dbType = sqlsugarTypes.FirstOrDefault(it =>
dbtypes.ToDictionary(u => u.Key, v => v.Value.ToLower()).ContainsValue(it.Key)); dbtypes.ToDictionary(u => u.Key, v => v.Value.ToLower()).ContainsValue(it.Key));
@ -123,7 +121,6 @@ namespace OpenAuth.Mvc
//设置定时启动的任务 //设置定时启动的任务
services.AddHostedService<QuartzService>(); services.AddHostedService<QuartzService>();
} }
public void ConfigureContainer(ContainerBuilder builder) public void ConfigureContainer(ContainerBuilder builder)

View File

@ -130,7 +130,7 @@ namespace OpenAuth.WebApi
// options.SuppressModelStateInvalidFilter = true; // options.SuppressModelStateInvalidFilter = true;
//启动WebAPI自动模态验证处理返回值 //启动WebAPI自动模态验证处理返回值
options.InvalidModelStateResponseFactory = context => options.InvalidModelStateResponseFactory = (ActionContext context) =>
{ {
var problems = new CustomBadRequest(context); var problems = new CustomBadRequest(context);