DataJPA/src/main/kotlin/com/chantha/jdbc/config/CORSConfig.kt
2020-05-17 13:35:32 +07:00

14 lines
432 B
Kotlin

package com.chantha.jdbc.config
import org.springframework.context.annotation.Configuration
import org.springframework.web.servlet.config.annotation.CorsRegistry
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
@Configuration
class CORSConfig :WebMvcConfigurer{
override fun addCorsMappings(registry: CorsRegistry) {
registry.addMapping("/**").allowedOrigins("http://localhost:3001")
}
}