From ec61f68df6c89b4e7bd64f4d0331be7b007d4161 Mon Sep 17 00:00:00 2001 From: Kload Date: Tue, 29 Oct 2013 11:53:22 +0000 Subject: [PATCH] Allow URI without trailing / --- access.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/access.lua b/access.lua index 5ed593f..690201f 100644 --- a/access.lua +++ b/access.lua @@ -120,7 +120,7 @@ function has_access (user, url) user = user or ngx.var.cookie_SSOwAuthUser url = url or ngx.var.host..ngx.var.uri for u, _ in pairs(conf["users"][user]) do - if string.starts(url, u) then return true end + if string.starts(url, string.sub(u, 1, -2)) then return true end end return false end