Hi,
For enabling security in ES i used Nginx with Lua and got some sample code from github . In that i am not clear at some part of code.
uri: http://localhost/_get
path:_get
for path, methods in pairs(restrictions[role]) do
-- path matched rules?
local p = string.match(uri, path) //here p contains "get"
-- method matched rules?
local m = nil
for _, _method in pairs(methods) do
m = m and m or string.match(method, _method) // what does this step will do?
end
if p and m then
allowed = true
break
end
end
if not allowed then
return write403Message()
end
Correct me if i am wrong..
Any help is highly appreciated..
Thanks