webflux で x-forwarded-for とかをケアする
以下の様にすれば良いっぽい。
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.web.reactive.config.WebFluxConfigurer
import org.springframework.web.server.adapter.ForwardedHeaderTransformer
@Configuration
class WebConfiguration : WebFluxConfigurer {
@Bean
fun forwardedHeaderTransformer(): ForwardedHeaderTransformer {
return ForwardedHeaderTransformer()
}
}
Published: 2018-11-20(Tue) 20:46