From 11d0e0689a6ace3981a213dffdb2a11c41a799f8 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 15 Sep 2018 09:25:48 +0200 Subject: [PATCH] [mod] Redirect after logout if `r` URI argument exists --- helpers.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/helpers.lua b/helpers.lua index 2d5e690..6822d6c 100644 --- a/helpers.lua +++ b/helpers.lua @@ -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