summaryrefslogtreecommitdiff
path: root/index.pl
diff options
context:
space:
mode:
Diffstat (limited to 'index.pl')
-rwxr-xr-xindex.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.pl b/index.pl
index b442126..52ec80f 100755
--- a/index.pl
+++ b/index.pl
@@ -920,7 +920,7 @@ post '/login' => sub {
}
else {
if ( $self->authenticate( $user, $password ) ) {
- $self->redirect_to('/');
+ $self->redirect_to( $self->req->param('redirect_to') // '/' );
}
else {
my $data = $self->get_user_password($user);
@@ -1173,7 +1173,7 @@ under sub {
if ( $self->is_user_authenticated ) {
return 1;
}
- $self->render('login');
+ $self->render( 'login', redirect_to => $self->req->url );
return undef;
};