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,9 +889,13 @@ function logout()
flash("info", t("logged_out"))
end
-- Redirect to portal anyway
-- 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
-- Set cookie and redirect (needed to properly set cookie)