From af431eab277a40577cb0f167b777cfbfbdbd29a3 Mon Sep 17 00:00:00 2001 From: Kirill Solomko Date: Mon, 19 Jan 2026 18:24:16 +0100 Subject: [PATCH] MT#64282 replace redirect with ajax_logout separation * a better way is to leave /logout as is and instead separate ajax_logout so that it's not chained from /logout anymore, resulting in 200 OK with empty application/json response, and without redirects by default Change-Id: Ide4f3845532e176e6866ebe61155e04d02aa3fbd (cherry picked from commit c48355ca034671b3297b281f606898613a6acd53) (cherry picked from commit c830a194d0b45c4a0272ea56ab384b05b89d6799) --- lib/NGCP/Panel/Controller/Logout.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/NGCP/Panel/Controller/Logout.pm b/lib/NGCP/Panel/Controller/Logout.pm index b9efc9ae3b..2e3ab063b0 100644 --- a/lib/NGCP/Panel/Controller/Logout.pm +++ b/lib/NGCP/Panel/Controller/Logout.pm @@ -24,11 +24,14 @@ Catalyst Controller. =cut sub logout_index :Path { + my ($self, $c) = @_; +} + +sub logout :Chained('/') :PathPart('logout') :Args(0) { my ( $self, $c, $realm ) = @_; $c->logout; - my $redirect = $c->req->params->{redirect} // 1; - $c->response->redirect($c->uri_for('/login')) if $redirect; + $c->response->redirect($c->uri_for('/login')); } sub ajax_logout :Chained('/') :PathPart('ajax_logout') :Args(0) {