No absolute paths in the LUA files

unstable
Y 2017-09-22 20:52:04 +02:00
parent de20c91871
commit 2f0e4be0fb
2 changed files with 4 additions and 7 deletions

View File

@ -166,7 +166,7 @@ Array of regular expressions to be matched against URLS **and** URIs and their r
#### logout
Associative array; when logging out of SSOwat, any existing cookie that is found as a key of this array triggers the associated logout URL. This only works on `http[s]://[*.]portal_domaini/`, though. (**example**: `{ "dcxd": "https://example.org/dotclear/admin/index.php?logout=1" }`)
Associative array; when logging out of SSOwat, any existing cookie that is found as a key of this array triggers the associated logout URL. This only works on `http[s]://[*.]portal_domain/`, though. (**example**: `{ "dcxd": "https://example.org/dotclear/admin/index.php?logout=1" }`)
#### default_language

View File

@ -317,19 +317,16 @@ end
--
-- We want to serve specific portal assets right at the root of the domain.
--
-- For example: `https://mydomain.org/ynhpanel.js` will serve the
-- `/yunohost/sso/assets/js/ynhpanel.js` file.
--
if hlp.is_logged_in() then
if string.match(req_data['request_uri'], "^/ynhpanel.js$") then
hlp.serve("/yunohost/sso/assets/js/ynhpanel.js")
hlp.serve(conf["portal_path"].."assets/js/ynhpanel.js")
end
if string.match(req_data['request_uri'], "^/ynhpanel.css$") then
hlp.serve("/yunohost/sso/assets/css/ynhpanel.css")
hlp.serve(conf["portal_path"].."assets/css/ynhpanel.css")
end
if string.match(req_data['request_uri'], "^/ynhpanel.json$") then
hlp.serve("/yunohost/sso/assets/js/ynhpanel.json")
hlp.serve(conf["portal_path"].."assets/js/ynhpanel.json")
end
-- If user has no access to this URL, redirect him to the portal