Skip to content

Add custom HeaderWriter in Kotlin DSL #8823

Closed
@eleftherias

Description

@eleftherias

The Kotlin DSL should allow setting a custom HeaderWriter

@EnableWebSecurity
class SecurityConfig : WebSecurityConfigurerAdapter() {

    override fun configure(http: HttpSecurity) {
       http {
            headers {
                addHeaderWriter(StaticHeadersWriter("customHeaderName", "customHeaderValue"));
            }
        }
    }
}

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