All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bybutter.sisyphus.starter.webflux.DelegatingCorsConfigurationSource.kt Maven / Gradle / Ivy

There is a newer version: 2.1.22
Show newest version
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