Make some variables explicitly local

This commit is contained in:
Alexandre Aubin 2024-01-30 20:55:16 +01:00
parent f6090f86d6
commit e877b2ee85

View file

@ -177,8 +177,8 @@ end
-- against all the uris rules/regexes from the conf and keep the longest matching one.
-- ###########################################################################
permission = nil
longest_match = ""
local permission = nil
local longest_match = ""
ngx_full_url = ngx.var.host..ngx.var.uri
@ -212,6 +212,8 @@ end
-- Or because the logged-in user is listed in the "users" list of the perm
-- ###########################################################################
local has_access
-- No permission object found = no access
if permission == nil then
logger:debug("No permission matching request for "..ngx.var.uri.." ... Assuming access is denied")