fix UserConnectionsLimitMiddlware - 429 message text.

This commit is contained in:
ngfrolov 2022-12-21 10:22:18 +05:00
parent cc8a4fa200
commit 7e9ec57e53
2 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ namespace AsbCloudWebApi.Middlewares
controllerNames = configuration.GetSection("userLimits")?.GetValue<IEnumerable<string>>("controllerNames");
var bodyText = $"<html><head><title>Too Many Requests</title></head><body><h1>Too Many Requests</h1><p>I only allow {parallelRequestsToController} parallel requests per user. Try again soon.</p></body></html>";
var bodyText = $"<html><head><title>Too Many Requests</title></head><body><h1>Too Many Requests</h1><p>I only allow {this.parallelRequestsToController} parallel requests per user. Try again soon.</p></body></html>";
responseBody = System.Text.Encoding.UTF8.GetBytes(bodyText);
}

View File

@ -13,9 +13,9 @@
"LocalConnection": "Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True"
},
"AllowedHosts": "*",
"userLimits": {
"parallelRequestsToController": 5
},
//"userLimits": {
// "parallelRequestsToController": 5
//},
"email": {
"smtpServer": "smtp.timeweb.ru",
"sender": "bot@autodrilling.ru",