CORS Filter to Spring Security
When you enable spring security to your spring boot application, add cors filter otherwise everything would be blocked
@Override
protected void configure(HttpSecurity http) throws Exception {
http.cors()
.and().authorizeRequests()
.anyRequest().permitAll()
.and().csrf().disable();
}
No comments:
Post a Comment