I am trying to achieve the following:
- Great access with any kind of login to a static
/index.html - All other accesses need to be authorized
Base on my research so far I created the following HTTPSecurity configuration:
http
.csrf().disable()
.authorizeRequests()
.antMatchers(new String[]{"/", "/index.html"}).permitAll()
.anyRequest().authenticated();
This, however seems only partly working since a call to localhost:8080/ is for some reason redirected to the blank page /auth. The call localhost:8080/index.html works.
What I am doing wrong here?
I am using Spring Boot 2.6.4.