Skip to content

Commit

Permalink
Update Spring-Vaadin의 CSRF 처리.md
Browse files Browse the repository at this point in the history
  • Loading branch information
HomoEfficio committed Nov 29, 2016
1 parent b6595a8 commit 1f06f26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Spring-Vaadin의 CSRF 처리.md
Expand Up @@ -6,7 +6,7 @@ Vaadin에서는 자체적으로 CSRF(Cross Site Request Forgery) 처리를 하

## csrf().ignoringAntMatchers()로 분기

Spring Security 설정을 담당하는 클래스에서 다음과 같이 `csrf().ignoringAntMatchers()`로 분기해주면, CSRF 방지 처리를 적용하는 경우와 안 하는 경우를 requet url 차원에서 나눠서 처리할 수 있게 된다.
Spring Security 설정을 담당하는 클래스에서 다음과 같이 `csrf().ignoringAntMatchers()`로 분기해주면, CSRF 방지 처리를 적용하는 경우와 안 하는 경우를 request url 차원에서 나눠서 처리할 수 있게 된다.

```java
@Configuration
Expand All @@ -22,7 +22,7 @@ public class PocApiSecurityConfig extends WebSecurityConfigurerAdapter {
.csrf().ignoringAntMatchers("/api1/**", "/api2/**", "/api3/**")
.and()
.authorizeRequests()
.antMatchers("/abc/**).permitAll()
.antMatchers("/abc/**").permitAll()
.antMatchers("/def/**").hasRole("USER")
.anyRequest().authenticated()
.and()
Expand Down

0 comments on commit 1f06f26

Please sign in to comment.