mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
Serve ynhpanel.js on every domains
This commit is contained in:
parent
c9a6d16565
commit
5e80f61b46
1 changed files with 17 additions and 9 deletions
26
access.lua
26
access.lua
|
@ -499,6 +499,19 @@ end
|
|||
-- Routing
|
||||
--
|
||||
|
||||
-- Logging in
|
||||
-- i.e. http://mydomain.org/~sso~a6e5320f
|
||||
|
||||
if string.match(ngx.var.uri, "~sso~%d+$") then
|
||||
cda_key = string.sub(ngx.var.uri, -7)
|
||||
if login[cda_key] then
|
||||
set_auth_cookie(login[cda_key], ngx.var.host)
|
||||
login[cda_key] = nil
|
||||
return redirect(string.gsub(ngx.var.uri, "~sso~%d+$", ""))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- Portal
|
||||
-- i.e. http://mydomain.org/ssowat/*
|
||||
|
||||
|
@ -556,16 +569,11 @@ then
|
|||
end
|
||||
end
|
||||
|
||||
-- Logging in
|
||||
-- i.e. http://mydomain.org/~sso~a6e5320f
|
||||
|
||||
if string.match(ngx.var.uri, "~sso~%d+$") then
|
||||
cda_key = string.sub(ngx.var.uri, -7)
|
||||
if login[cda_key] then
|
||||
set_auth_cookie(login[cda_key], ngx.var.host)
|
||||
login[cda_key] = nil
|
||||
return redirect(string.gsub(ngx.var.uri, "~sso~%d+$", ""))
|
||||
end
|
||||
-- Serve the panel JS
|
||||
|
||||
if string.match(ngx.var.uri, "^/ynhpanel.js$") then
|
||||
serve("/ynhsso/assets/js/ynhpanel.js")
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue