如何测试REST API的Spring安全性?

时间:2016-01-08 05:30:16

标签: spring spring-mvc spring-security xss csrf

我目前正在开发spring-security,而且我还有一些API,我需要为这些API提供安全性,以免受到XSS或任何其他类型的攻击。<​​/ p>

我按照this链接实现了它。

@EnableWebSecurity
@Configuration
public class WebSecurityConfig extends
WebSecurityConfigurerAdapter {

@Override
protected void configure(HttpSecurity http) throws Exception {
    http
    // ...
    .headers()
        .xssProtection()
            .block(false);
}
}

如何检查此配置是否有效?

我是否遵循了正确的程序?

0 个答案:

没有答案