Cors
This commit is contained in:
parent
a1f17d271f
commit
4614a11a8b
@ -42,9 +42,9 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void configure(HttpSecurity http) throws Exception {
|
protected void configure(HttpSecurity http) throws Exception {
|
||||||
http.csrf().disable().formLogin().disable().httpBasic().disable().logout().disable().sessionManagement()
|
http.csrf().disable().cors().and().formLogin().disable().httpBasic().disable().logout().disable()
|
||||||
.sessionCreationPolicy(SessionCreationPolicy.STATELESS).and().exceptionHandling().and()
|
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and().exceptionHandling()
|
||||||
.authenticationProvider(provider)
|
.and().authenticationProvider(provider)
|
||||||
.addFilterBefore(authenticationFilter(), AnonymousAuthenticationFilter.class).authorizeRequests()
|
.addFilterBefore(authenticationFilter(), AnonymousAuthenticationFilter.class).authorizeRequests()
|
||||||
.anyRequest().authenticated();
|
.anyRequest().authenticated();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user