VaadinWebSecurity breaking navigation?

I just decided to upgrade Vaadin 23 to a newer version and swap VaadinWebSecurityConfigurerAdapter to the newer class VaadinWebSecurity

This is the config class setup, it was working before changing it.

public class AdminSecurityConfig extends VaadinWebSecurity {

    protected void configure(HttpSecurity http) throws Exception {
            .antMatchers("/add-course", "/courses/*", "/upload-course", "/bookings").permitAll()


    public void configure(WebSecurity web) throws Exception {

There is no errors being logged, but when starting in Dev mode the Index page and other pages are broken (see attached screenshot)

Reverting back to the old parent class (VaadinWebSecurityConfigurerAdapter) it works again.

Is there something different I need to do?

So you are navigating to http://localhost:8080 and do you have @AnonymousAllowed on that Route?

Yea localhost:8080 and no annotation, have been doing it through AntMatchers before, will try adding it now

Ok interesting, index is working but when trying to navigate to any other page it is still broken. I will try adding annotations there

antMatchers is deprecated you should use

http.authorizeRequests().requestMatchers(new AntPathRequestMatcher("/images/*.png")).permitAll();