Add Global Rate Limiting support
This commit is contained in:
parent
14345ebcfe
commit
e0dece48f7
21 changed files with 1179 additions and 38 deletions
|
|
@ -2,6 +2,7 @@ local ngx_re_split = require("ngx.re").split
|
|||
|
||||
local certificate_configured_for_current_request =
|
||||
require("certificate").configured_for_current_request
|
||||
local global_throttle = require("global_throttle")
|
||||
|
||||
local ngx = ngx
|
||||
local io = io
|
||||
|
|
@ -160,6 +161,8 @@ function _M.rewrite(location_config)
|
|||
|
||||
return ngx_redirect(uri, config.http_redirect_code)
|
||||
end
|
||||
|
||||
global_throttle.throttle(config.global_throttle, location_config.global_throttle)
|
||||
end
|
||||
|
||||
function _M.header()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue