Commit f89959ee authored by frankiejol's avatar frankiejol Committed by Francesc Guasch
Browse files

refactor(frontend): double logout to finish WS

parent 96bce990
......@@ -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{^/$};
......@@ -1559,7 +1559,6 @@ sub _logged_in {
$c->stash(_logged_in => $login );
$c->stash(_user => $USER);
$c->stash(_anonymous => !$USER);
}
$c->stash(url => undef);
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment