url "?continue" after the login

noticed that sometimes Vaadin adds ‘continue’ parameter to the url, for example:

https://localhost:8080/login?continue&continue&continue&continue

What does this mean? And is it possible to disable such behavior?

It’s from Spring Security. See https://docs.spring.io/spring-security/reference/5.8/migration/servlet/session-management.html#requestcache-query-optimization

1 Like

How can I add this in my code?

This is my code @EnableWebSecurity
@Configuration
public class SecurityConfig extends VaadinWebSecurity {

@Override
protected void configure(HttpSecurity http) throws Exception {
    
     http.authorizeHttpRequests().requestMatchers(new AntPathRequestMatcher("/images/*.png")).permitAll();

        http.authorizeHttpRequests().requestMatchers(new AntPathRequestMatcher("/line-awesome/**/*.svg")).permitAll();
        super.configure(http);
        setLoginView(http, LoginView.class);
}

@Override
public void configure(WebSecurity web) throws Exception {

    super.configure(web);
}


@Bean
public UserDetailsManager userDetailsService() {
    UserDetails user = User.withUsername("user").password("{noop}user").roles("USER").build();
    UserDetails admin = User.withUsername("admin").password("{noop}admin").roles("ADMIN").build();
    return new InMemoryUserDetailsManager(user, admin);
}

}

I don’t think there is an official supported way of customizing the default VaadinRequestCache. You have to dig a little deeper and probably customer or supply your own cache