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) } }