Browse Source

Polish Kotlin snippet

- to match the comments in the related Java snippet

Issue gh-11959
pull/12266/head
Josh Cummings 3 years ago
parent
commit
01117b11fe
No known key found for this signature in database
GPG Key ID: A306A51F43B8E5A5
  1. 4
      docs/modules/ROOT/pages/migration/reactive.adoc

4
docs/modules/ROOT/pages/migration/reactive.adoc

@ -186,7 +186,9 @@ open fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChai @@ -186,7 +186,9 @@ open fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChai
fun csrfCookieWebFilter(): WebFilter {
return WebFilter { exchange, chain ->
val csrfToken = exchange.getAttribute<Mono<CsrfToken>>(CsrfToken::class.java.name) ?: Mono.empty()
csrfToken.doOnSuccess { }.then(chain.filter(exchange))
csrfToken.doOnSuccess {
/* Ensures the token is subscribed to. */
}.then(chain.filter(exchange))
}
}
----

Loading…
Cancel
Save