【调整】移除第三方AspNetCoreRateLimit限流组件,使用.net8自带的RateLimiter特性。

This commit is contained in:
jianweie code
2023-11-17 13:36:08 +08:00
parent 4425c53413
commit 9efb2e11a6
11 changed files with 203 additions and 262 deletions

View File

@@ -89,10 +89,6 @@ namespace CoreCms.Net.Configuration
/// </summary>
public static readonly bool MiddlewareIpLogEnabled = AppSettingsHelper.GetContent("Middleware", "IPLog", "Enabled").ObjToBool();
/// <summary>
/// 是否开启IP限流
/// </summary>
public static readonly bool MiddlewareIpRateLimitEnabled = AppSettingsHelper.GetContent("Middleware", "IpRateLimit", "Enabled").ObjToBool();
/// <summary>
/// 记录请求与返回数据
/// </summary>
public static readonly bool MiddlewareRequestResponseLogEnabled = AppSettingsHelper.GetContent("Middleware", "RequestResponseLog", "Enabled").ObjToBool();
@@ -112,14 +108,6 @@ 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 HangFire定时任务================================================================================