How can I configure Spring Security 6 to ignore the static resources folder?
I am storing my public web resources (CSS, JS) in the 'static' folder, with the following path: 'java/com/myapp/resources/static/**'. Here my configuration classes: SecurityConfig.java @Configuration @EnableWebSecurity public class SecurityConfig { @Bean public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { http .authorizeHttpRequests(authorize -> authorize .anyRequest().authenticated()) .formLogin(form -> form .loginPage("/login") .permitAll()); return http.build(); } @Bean public WebSecurityCustomizer webSecurityCustomizer() throws Exception { return (web) -> w
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.