Created
March 14, 2019 16:23
-
-
Save skryvets/3f2758c2262a5cab175de464a9c26323 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableWebSecurity | |
public class WebSecurity extends WebSecurityConfigurerAdapter { | |
public WebSecurity() {} | |
@Override | |
protected void configure(HttpSecurity http) throws Exception { | |
http.cors().and().csrf().disable().authorizeRequests() | |
.antMatchers("/**").permitAll() | |
// this disables session creation on Spring Security | |
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment