Add shouldFilterAllDispatcherTypes to Kotlin DSL
Closes gh-11153
This commit is contained in:
committed by
Marcus Hert Da Coregio
parent
8e34cedcfe
commit
e94adedb94
@@ -190,4 +190,18 @@ SecurityFilterChain web(HttpSecurity http) throws Exception {
|
||||
return http.build();
|
||||
}
|
||||
----
|
||||
.Kotlin
|
||||
[source,kotlin,role="secondary"]
|
||||
----
|
||||
@Bean
|
||||
open fun web(http: HttpSecurity): SecurityFilterChain {
|
||||
http {
|
||||
authorizeHttpRequests {
|
||||
shouldFilterAllDispatcherTypes = true
|
||||
authorize(anyRequest, authenticated)
|
||||
}
|
||||
}
|
||||
return http.build()
|
||||
}
|
||||
----
|
||||
====
|
||||
|
||||
Reference in New Issue
Block a user