aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/routes.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/routes.go')
-rw-r--r--plugins/base/routes.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/base/routes.go b/plugins/base/routes.go
index e83c047..293d313 100644
--- a/plugins/base/routes.go
+++ b/plugins/base/routes.go
@@ -141,6 +141,9 @@ func handleLogin(ctx *koushin.Context) error {
}
ctx.SetSession(s)
+ if path := ctx.QueryParam("next"); path != "" && path[0] == '/' && path != "/login" {
+ return ctx.Redirect(http.StatusFound, path)
+ }
return ctx.Redirect(http.StatusFound, "/mailbox/INBOX")
}