ingress-nginx lua plugins documentation
This commit is contained in:
parent
1eeb149b91
commit
b60e25f1db
5 changed files with 62 additions and 7 deletions
|
|
@ -1,14 +1,10 @@
|
|||
local _M = {}
|
||||
|
||||
function _M.rewrite()
|
||||
ngx.req.set_header("x-hello-world", "1")
|
||||
end
|
||||
|
||||
function _M.access()
|
||||
local ua = ngx.var.http_user_agent
|
||||
|
||||
if ua == "hello" then
|
||||
ngx.exit(403)
|
||||
ngx.req.set_header("x-hello-world", "1")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue