mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
Cache fix
This commit is contained in:
parent
d611d15ce2
commit
098923c980
1 changed files with 7 additions and 2 deletions
|
@ -130,6 +130,11 @@ end
|
|||
|
||||
function set_headers (user)
|
||||
user = user or ngx.var.cookie_SSOwAuthUser
|
||||
if not cache[user] then
|
||||
flash("info", "Please log in to access to this content")
|
||||
local back_url = ngx.var.scheme .. "://" .. ngx.var.http_host .. ngx.var.uri
|
||||
return redirect(portal_url.."?r="..ngx.encode_base64(back_url))
|
||||
end
|
||||
if not cache[user]["mail"] then
|
||||
ldap = lualdap.open_simple("localhost")
|
||||
for dn, attribs in ldap:search {
|
||||
|
|
Loading…
Reference in a new issue