com.bybutter.sisyphus.starter.webflux.DelegatingCorsConfigurationSource.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sisyphus-webflux-starter Show documentation
Show all versions of sisyphus-webflux-starter Show documentation
Starter for build application with String Webflux in Sisyphus Framework
package com.bybutter.sisyphus.starter.webflux
import org.springframework.web.cors.CorsConfiguration
import org.springframework.web.cors.reactive.CorsConfigurationSource
import org.springframework.web.server.ServerWebExchange
class DelegatingCorsConfigurationSource(sources: Iterable) : CorsConfigurationSource {
private val sources: List = sources.toList()
override fun getCorsConfiguration(exchange: ServerWebExchange): CorsConfiguration? {
for (it in sources) {
return it.getCorsConfiguration(exchange) ?: continue
}
return null
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy