Files
hoperun-custom-sign/src/main/kotlin/com/pomelotea/hoperun/sign/config/WebConfig.kt
Jimgo 25d326e4a7 🆗 添加2025年调休与节假日配置
🆗 调整样式兼容手机端访问
2024-11-29 16:04:56 +08:00

22 lines
633 B
Kotlin

package com.pomelotea.hoperun.sign.config
import org.springframework.context.annotation.Configuration
import org.springframework.web.servlet.config.annotation.CorsRegistry
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
/**
*
* @author jimlee
* @create 2024/11/1 13:15
*/
@Configuration
open class CorsConfig : WebMvcConfigurer {
override fun addCorsMappings(registry: CorsRegistry) {
registry.addMapping("/**")
.allowedMethods("*")
.allowedHeaders("*")
.allowedOriginPatterns("*")
.allowCredentials(true)
.maxAge(3600)
}
}