mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 20:03:26 +08:00
【新增】新增并发限制中间件【Microsoft.AspNetCore.ConcurrencyLimiter】,限制并发处理,请结合限流进行合理配置。
This commit is contained in:
@@ -24,7 +24,6 @@ namespace CoreCms.Net.Configuration
|
||||
public static readonly string AppConfigAppInterFaceUrl = AppSettingsHelper.GetContent("AppConfig", "AppInterFaceUrl");
|
||||
#endregion
|
||||
|
||||
|
||||
#region 数据库================================================================================
|
||||
/// <summary>
|
||||
/// 获取数据库连接字符串
|
||||
@@ -36,7 +35,6 @@ namespace CoreCms.Net.Configuration
|
||||
public static readonly string DbDbType = AppSettingsHelper.GetContent("ConnectionStrings", "DbType");
|
||||
#endregion
|
||||
|
||||
|
||||
#region redis================================================================================
|
||||
|
||||
/// <summary>
|
||||
@@ -55,7 +53,6 @@ namespace CoreCms.Net.Configuration
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region AOP================================================================================
|
||||
/// <summary>
|
||||
/// 事务切面开关
|
||||
@@ -71,14 +68,12 @@ namespace CoreCms.Net.Configuration
|
||||
public static readonly string JwtConfigAudience = AppSettingsHelper.GetContent("JwtConfig", "Audience");
|
||||
#endregion
|
||||
|
||||
|
||||
#region Cors跨域设置================================================================================
|
||||
public static readonly string CorsPolicyName = AppSettingsHelper.GetContent("Cors", "PolicyName");
|
||||
public static readonly bool CorsEnableAllIPs = AppSettingsHelper.GetContent("Cors", "EnableAllIPs").ObjToBool();
|
||||
public static readonly string CorsIPs = AppSettingsHelper.GetContent("Cors", "IPs");
|
||||
#endregion
|
||||
|
||||
|
||||
#region Middleware中间件================================================================================
|
||||
/// <summary>
|
||||
/// 是否记录ip信息
|
||||
@@ -108,8 +103,14 @@ namespace CoreCms.Net.Configuration
|
||||
/// 是否开启记录到数据库模式
|
||||
/// </summary>
|
||||
public static readonly bool MiddlewareRecordAccessLogsEnabledDbMode = AppSettingsHelper.GetContent("Middleware", "RecordAccessLogs", "EnabledDbMode").ObjToBool();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 并发限制(最大并发请求数)
|
||||
/// </summary>
|
||||
public static readonly int MiddlewareConcurrencyLimiterMaxConcurrentRequests = AppSettingsHelper.GetContent("Middleware", "ConcurrencyLimiter", "MaxConcurrentRequests").ObjToInt(100);
|
||||
/// <summary>
|
||||
/// 并发限制(最大请求数)
|
||||
/// </summary>
|
||||
public static readonly int MiddlewareConcurrencyLimiterRequestQueueLimit = AppSettingsHelper.GetContent("Middleware", "ConcurrencyLimiter", "RequestQueueLimit").ObjToInt(100);
|
||||
#endregion
|
||||
|
||||
#region 支付================================================================================
|
||||
@@ -145,7 +146,6 @@ namespace CoreCms.Net.Configuration
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 微信配置================================================================================
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user