From f89959ee917f09584a72e5b95a9a5e5aa47a4fd0 Mon Sep 17 00:00:00 2001 From: frankiejol Date: Tue, 2 Mar 2021 15:01:32 +0100 Subject: [PATCH] refactor(frontend): double logout to finish WS --- script/rvd_front | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/script/rvd_front b/script/rvd_front index 44c22daca..5c73b8430 100644 --- a/script/rvd_front +++ b/script/rvd_front @@ -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); }