Merge pull request #109 from tituspijean/mod-redirect-logout

[mod] Redirect after logout if `r` URI argument exists
This commit is contained in:
Alexandre Aubin 2018-10-27 18:01:19 +02:00 committed by GitHub
commit 3ad215124c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -889,8 +889,12 @@ function logout()
flash("info", t("logged_out"))
end
-- Redirect to portal anyway
return redirect(conf.portal_url)
-- Redirect with the `r` URI argument if it exists or redirect to portal
if args.r then
return redirect(ngx.decode_base64(args.r))
else
return redirect(conf.portal_url)
end
end