This commit is contained in:
Parpaillax
2024-04-24 12:14:24 +02:00
parent 7df76ea3ed
commit 1d41a7beeb
3 changed files with 5 additions and 6 deletions

View File

@@ -24,7 +24,7 @@ public class WebSecurityConfig{
.anyRequest().authenticated())
.formLogin((form) -> form.loginPage("/login").defaultSuccessUrl("/", true))
.logout((logout) -> logout.clearAuthentication(true).invalidateHttpSession(true)
.deleteCookies("JSESSIONID").logoutSuccessUrl("/login")
.deleteCookies("JSESSIONID").logoutSuccessUrl("/login?logout")
.logoutRequestMatcher(new AntPathRequestMatcher("/logout")).permitAll());
return http.build();