mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
Merge pull request #132 from eauchat/theming-reloaded-redirections
Theming reloaded redirections improved
This commit is contained in:
commit
4c2a9da784
1 changed files with 6 additions and 1 deletions
|
@ -162,7 +162,12 @@ then
|
||||||
-- If all the previous cases have failed, redirect to portal
|
-- If all the previous cases have failed, redirect to portal
|
||||||
else
|
else
|
||||||
hlp.flash("info", hlp.t("please_login"))
|
hlp.flash("info", hlp.t("please_login"))
|
||||||
return hlp.redirect(conf.portal_url)
|
-- Force the scheme to HTTPS. This is to avoid an issue with redirection loop
|
||||||
|
-- when trying to access http://main.domain.tld/ (SSOwat finds that user aint
|
||||||
|
-- logged in, therefore redirects to SSO, which redirects to the back_url, which
|
||||||
|
-- redirect to SSO, ..)
|
||||||
|
local back_url = "https://" .. ngx.var.host .. ngx.var.uri .. hlp.uri_args_string()
|
||||||
|
return hlp.redirect(conf.portal_url.."?r="..ngx.encode_base64(back_url))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue