Last active
December 1, 2016 08:24
-
-
Save dherges/cdec0cf7ed9deb51148d14d6188a21ad to your computer and use it in GitHub Desktop.
spring-csrf-cookie-to-header-token
This file contains hidden or 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
@EnableWebSecurity | |
public class WebSecurityConfig extends WebSecurityConfigurerAdapter { | |
@Override | |
protected void configure(HttpSecurity http) throws Exception { | |
http | |
.csrf() | |
.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse()) | |
.and() | |
// other web security config follows ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment