From 4614a11a8bf7a04df0c301f978f6c8b93dc6fbe6 Mon Sep 17 00:00:00 2001 From: Filip Izydorczyk Date: Sat, 24 Oct 2020 17:54:00 +0200 Subject: [PATCH] Cors --- .../java/com/plannaplan/security/WebSecurityConfig.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/restservice/src/main/java/com/plannaplan/security/WebSecurityConfig.java b/restservice/src/main/java/com/plannaplan/security/WebSecurityConfig.java index 25628fb..95b3785 100755 --- a/restservice/src/main/java/com/plannaplan/security/WebSecurityConfig.java +++ b/restservice/src/main/java/com/plannaplan/security/WebSecurityConfig.java @@ -42,9 +42,9 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { - http.csrf().disable().formLogin().disable().httpBasic().disable().logout().disable().sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS).and().exceptionHandling().and() - .authenticationProvider(provider) + http.csrf().disable().cors().and().formLogin().disable().httpBasic().disable().logout().disable() + .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and().exceptionHandling() + .and().authenticationProvider(provider) .addFilterBefore(authenticationFilter(), AnonymousAuthenticationFilter.class).authorizeRequests() .anyRequest().authenticated();