mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
Change main_domain to portal_domain
This commit is contained in:
parent
a5e423c23d
commit
d75de14c64
2 changed files with 5 additions and 5 deletions
|
@ -5,10 +5,10 @@ cookies = {}
|
|||
local conf_file = assert(io.open(conf_path, "r"), "Configuration file is missing")
|
||||
local conf = json.decode(conf_file:read("*all"))
|
||||
local portal_url = conf["portal_scheme"].."://"..
|
||||
conf["main_domain"]..
|
||||
conf["portal_domain"]..
|
||||
":"..conf["portal_port"]..
|
||||
conf["portal_path"]
|
||||
table.insert(conf["skipped_urls"], conf["main_domain"]..conf["portal_path"])
|
||||
table.insert(conf["skipped_urls"], conf["portal_domain"]..conf["portal_path"])
|
||||
|
||||
-- Dummy intructions
|
||||
ngx.header["X-SSO-WAT"] = "You've just been SSOed"
|
||||
|
@ -62,7 +62,7 @@ end
|
|||
function set_redirect_cookie (redirect_url)
|
||||
cook(
|
||||
"YnhAuthRedirect="..redirect_url..
|
||||
"; Domain=."..conf["main_domain"]..
|
||||
"; Domain=."..conf["portal_domain"]..
|
||||
"; Path="..conf["portal_path"]..
|
||||
"; Max-Age=3600"
|
||||
)
|
||||
|
@ -235,7 +235,7 @@ if ngx.var.request_method == "GET" then
|
|||
end
|
||||
|
||||
-- Portal
|
||||
if ngx.var.host == conf["main_domain"]
|
||||
if ngx.var.host == conf["portal_domain"]
|
||||
and string.starts(ngx.var.uri, conf["portal_path"])
|
||||
then
|
||||
if ngx.var.request_method == "GET" then
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"main_domain": "mydomain.com",
|
||||
"portal_domain": "mydomain.com",
|
||||
"portal_path": "/ssowat/",
|
||||
"portal_port": "443",
|
||||
"portal_scheme": "https",
|
||||
|
|
Loading…
Add table
Reference in a new issue