ingress-nginx lua plugins documentation

This commit is contained in:
Elvin Efendi 2020-04-13 00:10:01 -04:00
parent 1eeb149b91
commit b60e25f1db
5 changed files with 62 additions and 7 deletions

View file

@ -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