spring-security icon indicating copy to clipboard operation
spring-security copied to clipboard

CsrfDsl does not have a spa() configuration method.

Open XhstormR opened this issue 11 months ago • 2 comments

Describe the bug According to the documentation, org.springframework.security.config.annotation.web.CsrfDsl should have a spa() configuration method, but it doesn't. https://docs.spring.io/spring-security/reference/servlet/exploits/csrf.html#csrf-integration-javascript-spa

Image

To Reproduce

    @Bean
    open fun securityFilterChain(http: HttpSecurity): SecurityFilterChain {
        http {
            // ...
            csrf {
                spa()
            }
        }
        return http.build()
    }

Expected behavior According to the documentation, CsrfDsl should have a spa() configuration method.

XhstormR avatar Dec 18 '25 09:12 XhstormR

@jzheaux ping

XhstormR avatar Feb 19 '26 07:02 XhstormR

Issue still remains.

Any updates on this other than the workaround to use the Java API?

Leon4ever2802 avatar Jul 17 '26 21:07 Leon4ever2802