Skip to content

Commit

Permalink
refactor(frontend): double logout to finish WS
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiejol committed Mar 2, 2021
1 parent 96bce99 commit f89959e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions script/rvd_front
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ hook before_routes => sub {
return if $url =~ m{^/(css|font|img|js)}
|| $url =~ m{^/fallback/.*\.(css|js|map)$};

return if $url =~ m{^/(login|logout|requirements|robots.txt)};
return if $url =~ m{^/(login|logout|requirements|robots.txt|favicon.ico)};

if ( $RAVADA->is_in_maintenance ) {
return login($c) if !$USER && $url =~ m{^/$};
Expand Down Expand Up @@ -1559,7 +1559,6 @@ sub _logged_in {
$c->stash(_logged_in => $login );
$c->stash(_user => $USER);
$c->stash(_anonymous => !$USER);

}
$c->stash(url => undef);

Expand Down Expand Up @@ -1654,7 +1653,10 @@ sub logout {
my $c = shift;

$USER = undef;
$c->session(expires => 1);
$c->session(expires => -1);
$c->session(login => undef);
sleep 1;
$c->session(expires => -1);
$c->session(login => undef);

}
Expand Down

0 comments on commit f89959e

Please sign in to comment.