修改用户配置
This commit is contained in:
@@ -37,7 +37,7 @@ namespace IRaCIS.Core.API
|
||||
.AddJsonFile($"appsettings.{environment}.json", false, true);
|
||||
})
|
||||
.Build();
|
||||
|
||||
|
||||
|
||||
NewId.SetProcessIdProvider(new CurrentProcessIdProvider());
|
||||
|
||||
|
||||
@@ -122,6 +122,8 @@ namespace IRaCIS.Core.API
|
||||
//services.AddIpPolicyRateLimitSetup(_configuration);
|
||||
// 用户类型 策略授权
|
||||
services.AddAuthorizationPolicySetup(_configuration);
|
||||
|
||||
services.AddJsonConfigSetup(_configuration);
|
||||
//转发头设置 获取真实IP
|
||||
services.Configure<ForwardedHeadersOptions>(options =>
|
||||
{
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace IRaCIS.Core.API
|
||||
{
|
||||
public static class JsonConfigSetup
|
||||
{
|
||||
public static void AddJsonConfigSetup(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
|
||||
services.Configure<ServiceVerifyConfigOption>(configuration.GetSection("BasicSystemConfig"));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,9 +13,9 @@
|
||||
},
|
||||
"BasicSystemConfig": {
|
||||
|
||||
"OpenUserComplexPassword": false,
|
||||
"OpenUserComplexPassword": true,
|
||||
|
||||
"OpenSignDocumentBeforeWork": false
|
||||
"OpenSignDocumentBeforeWork": true
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user