首次提交
This commit is contained in:
46
target/fastweb/interceptor.lua
Normal file
46
target/fastweb/interceptor.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
-- 拦截器
|
||||
local M = {}
|
||||
|
||||
|
||||
M.module = fw_interceptor
|
||||
|
||||
--[[
|
||||
FUNCTION: 增加规则
|
||||
PARAM
|
||||
express : 规则
|
||||
filepath : LUA脚本
|
||||
--]]
|
||||
function M.add(express,filepath)
|
||||
M.module.add(express,filepath)
|
||||
end
|
||||
|
||||
--[[
|
||||
FUNCTION: 是否存在拦截规则
|
||||
PARAM
|
||||
express : 规则
|
||||
RRETURN
|
||||
`bool`
|
||||
--]]
|
||||
function M.exist(express)
|
||||
return M.module.exist(express)
|
||||
end
|
||||
|
||||
--[[
|
||||
FUNCTION: 移除拦截规则
|
||||
PARAM
|
||||
express : 规则
|
||||
RRETURN
|
||||
`bool`
|
||||
--]]
|
||||
function M.remove(express)
|
||||
return M.module.remove(express)
|
||||
end
|
||||
|
||||
--[[
|
||||
FUNCTION: 清空拦截器
|
||||
--]]
|
||||
function M.clear(express)
|
||||
return M.module.clear(express)
|
||||
end
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user