I've just added Spring Security to my project. I've also added this configuration:
@Configuration
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().anyRequest().permitAll();
}
}
but now not all of my endpoints work. In fact only a single endpoint works, for the rest I get 403 Forbidden
. What could be the problem? How can I allow any and all requests (effectively making security a pass-through).
http.authorizeRequests().antMatchers("/**").permitAll().anyRequest()
– Reganregard