forked from ddrilling/AsbCloudServer
fix UserConnectionsLimitMiddlware - 429 message text.
This commit is contained in:
parent
cc8a4fa200
commit
7e9ec57e53
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user