14 lines
432 B
Kotlin
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")
|
|
}
|
|
}
|