Skip to content

Add tokenFromMultipartDataEnabled to server CSRF Kotlin DSL #8602

@eleftherias

Description

@eleftherias

We should allow a user to set tokenFromMultipartDataEnabled in the Kotlin DSL, just as we do in the Java DSL.
The configuration would look like

@EnableWebSecurity
open class CsrfConfig : WebSecurityConfigurerAdapter() {
    override fun configure(http: HttpSecurity) {
        http {
            csrf {
                tokenFromMultipartDataEnabled = true
            }
        }
    }
}

Metadata

Metadata

Assignees

Labels

in: configAn issue in spring-security-configtype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions