Hey Guys, I try to add CORS to a spring app but I ...
# spring
p
Hey Guys, I try to add CORS to a spring app but I can't figure out why I can't get it to work. Requests via Postman are succeeding, requests from my frontend not. Does one of you might have an idea? Thanks in advance!
Copy code
fun main(args: Array<String>) {
    runApplication<SomeApplicationName>(*args)
}


//<https://docs.spring.io/spring/docs/4.2.x/spring-framework-reference/html/cors.html>
@Configuration
@EnableWebMvc
class CorsConfig: WebMvcConfigurer {
    override fun addCorsMappings(registry: CorsRegistry) {
        registry.addMapping("/**")
    }
}