Misc cosmetics / debug tweaks

This commit is contained in:
Alexandre Aubin 2020-09-20 18:00:49 +02:00
parent dcbf66d4e4
commit 41ed91bbcb
2 changed files with 7 additions and 5 deletions

View file

@ -226,11 +226,12 @@ end
--
-- 3. Redirected URLs
-- 3. REDIRECTED URLS
--
-- If the URL matches one of the `redirected_urls` in the configuration file,
-- just redirect to the target URL/URI
--
function detect_redirection(redirect_url)
if hlp.string.starts(redirect_url, "http://")
or hlp.string.starts(redirect_url, "https://") then

View file

@ -302,17 +302,18 @@ function has_access(permission, user)
user = user or authUser
if permission == nil then
logger.debug("No permission matching request for "..ngx.var.uri)
return false
end
-- Public access
if user == nil or permission["public"] then
user = user or "A visitor"
logger.debug(user.." tries to access "..ngx.var.uri)
logger.debug(user.." tries to access "..ngx.var.uri.." (corresponding perm: "..permission["id"]..")")
return permission["public"]
end
logger.debug("User "..user.." tries to access "..ngx.var.uri)
logger.debug("User "..user.." tries to access "..ngx.var.uri.." (corresponding perm: "..permission["id"]..")")
-- All user in this permission
allowed_users = permission["users"]
@ -508,7 +509,7 @@ end
-- It is used to render the SSOwat portal *only*.
function serve(uri, cache)
logger.debug("Serving portal uri "..uri.." (if the corresponding file exists)")
logger.debug("Serving portal uri "..uri)
rel_path = string.gsub(uri, conf["portal_path"], "/")