title: Spring security - Disable logout redirect
body: <p>I'm using spring security with REST, and I'm using the URL (<code>/logout</code>) as an endpoint for my logout method. But after calling this method, it redirect me to (<code>/login?logout</code>), I know this is the spring <code>logOutSuccessUrl</code>. And I want to get rid of the redirection. This is my code:</p>
  
  <pre><code>protected void configure(HttpSecurity http) throws Exception {
  
      http.authorizeRequests()
           .antMatchers("/login").permitAll()
           .anyRequest().fullyAuthenticated()
           .and().requiresChannel().anyRequest().requiresSecure()
           .and().httpBasic().disable().logout()
           .disable()
         //  .logoutSuccessHandler(new HttpStatusReturningLogoutSuccessHandler(HttpStatus.OK))
            .csrf().disable();
  
  }
  </code></pre>
  
  <p>I tried to use <code>HttpStatusReturningLogoutSuccessHandler</code> but it didn't work, and even setting <code>logoutSuccessUrl()</code> doesn't change anything.</p>
  
  <p>Do you know how can I disable this redirection?</p>