MT#64282 add redirect=0 option to /ajax_logout

* ajax_logout can now return 200 without further redirect
  when redirect=0 query param is provided

Change-Id: I03f499e1090895c2fb382494dd4cc872427692f1
(cherry picked from commit 4a1f5f4b28)
(cherry picked from commit 474e50cbf2)
mr12.5.1
Kirill Solomko 3 months ago
parent 79b1379435
commit 813e8b70fb

@ -27,7 +27,8 @@ sub logout_index :Path {
my ( $self, $c, $realm ) = @_;
$c->logout;
$c->response->redirect($c->uri_for('/login'));
my $redirect = $c->req->params->{redirect} // 1;
$c->response->redirect($c->uri_for('/login')) if $redirect;
}
sub ajax_logout :Chained('/') :PathPart('ajax_logout') :Args(0) {

Loading…
Cancel
Save