I\'m using spring security with REST, and I\'m using the URL (/logout) as an endpoint for my logout method. But after calling this method, it redirect me to (
/logout
Following code works for me (notice that it doesn't have logout().disable())
logout().disable()
http.logout().permitAll(); http.logout().logoutSuccessHandler((new HttpStatusReturningLogoutSuccessHandler(HttpStatus.OK)));