Browse Source

[Feature] Add `rip` keyword to ratelimit module

tags/1.5.0
Andrew Lewis 7 years ago
parent
commit
a2689e7b17
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      src/plugins/lua/ratelimit.lua

+ 7
- 0
src/plugins/lua/ratelimit.lua View File

@@ -113,6 +113,13 @@ local keywords = {
return nil
end,
},
['rip'] = {
['get_value'] = function(task)
local ip = task:get_ip()
if ip and ip:is_valid() and not ip:is_local() then return ip end
return nil
end,
},
['from'] = {
['get_value'] = function(task)
local from = task:get_from(0)

Loading…
Cancel
Save