We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 301af4e commit 58b6e92Copy full SHA for 58b6e92
ngx_http_dynamic_limit_req_module.c
@@ -219,6 +219,11 @@ static ngx_int_t ngx_http_limit_req_handler(ngx_http_request_t *r) {
219
if (reply->str == NULL) {
220
reply = redisCommand(c, "SETEX %s %s %s", Host, block_second,
221
Host);
222
+ /* Increase the history record */
223
+ reply = redisCommand(c,"SELECT 1");
224
+ reply = redisCommand(c, "SET %s %s", Host, Host);
225
+ reply = redisCommand(c,"SELECT 0");
226
227
}
228
229
if (rc != NGX_AGAIN) {
@@ -245,7 +250,7 @@ static ngx_int_t ngx_http_limit_req_handler(ngx_http_request_t *r) {
245
250
246
251
ngx_log_error(lrcf->limit_log_level, r->connection->log, 0,
247
252
"limiting requests, excess: %ui.%03ui by zone \"%V\" "
248
- "ip=%s ip2=%V num1=%d ,num2=%d",
253
+ "ip=%s ip2=%V num1=%d num2=%d",
249
254
excess / 1000, excess % 1000, &limit->shm_zone->shm.name, Host,
255
&r->connection->addr_text, strlen((char * )Host),
256
r->connection->addr_text.len);
0 commit comments