mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
Add rate limit per hour "r/h"
Add the opportunity to apply rate limit by hour.
This commit is contained in:
parent
d25139db01
commit
67b26d8238
@ -912,6 +912,10 @@ ngx_http_limit_req_zone(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
} else if (ngx_strncmp(p, "r/m", 3) == 0) {
|
||||
scale = 60;
|
||||
len -= 3;
|
||||
|
||||
} else if (ngx_strncmp(p, "r/h", 3) == 0) {
|
||||
scale = 3600;
|
||||
len -= 3;
|
||||
}
|
||||
|
||||
rate = ngx_atoi(value[i].data + 5, len - 5);
|
||||
|
Loading…
Reference in New Issue
Block a user