mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
Update access.lua
This commit is contained in:
parent
12412cc6c8
commit
54361457c8
1 changed files with 23 additions and 0 deletions
23
access.lua
23
access.lua
|
@ -269,6 +269,29 @@ if conf["skipped_regex"] then
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 4b. Noauth URLs
|
||||||
|
--
|
||||||
|
-- If the URL matches one of the `no_auth` in the configuration file,
|
||||||
|
-- it means that the URL should be protected by the SSO but no header
|
||||||
|
-- has to be sent, even if the user is already authenticated.
|
||||||
|
--
|
||||||
|
|
||||||
|
if conf["noauth_urls"] then
|
||||||
|
if hlp.is_logged_in() then
|
||||||
|
for _, noauth in ipairs(conf["noauth_urls"]) do
|
||||||
|
if (hlp.string.starts(ngx.var.host..ngx.var.uri..hlp.uri_args_string(), noauth)
|
||||||
|
or hlp.string.starts(ngx.var.uri..hlp.uri_args_string(), noauth))
|
||||||
|
then
|
||||||
|
logger.debug("Noauth "..ngx.var.uri)
|
||||||
|
return hlp.pass()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- 5. Protected URLs
|
-- 5. Protected URLs
|
||||||
--
|
--
|
||||||
|
|
Loading…
Add table
Reference in a new issue