[#28] 쿠버네티스 환경 배포 #29

Merged
pricelees merged 25 commits from infra/#28 into main 2025-08-04 05:59:38 +00:00
3 changed files with 11 additions and 2 deletions
Showing only changes of commit 15b9ef4a08 - Show all commits

View File

@ -1,14 +1,19 @@
package roomescape.common.config package roomescape.common.config
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Configuration import org.springframework.context.annotation.Configuration
import org.springframework.web.servlet.config.annotation.CorsRegistry import org.springframework.web.servlet.config.annotation.CorsRegistry
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
@Configuration @Configuration
class CorsConfig : WebMvcConfigurer { class CorsConfig : WebMvcConfigurer {
@Value("\${cors-origin}")
private lateinit var origin: String
override fun addCorsMappings(registry: CorsRegistry) { override fun addCorsMappings(registry: CorsRegistry) {
registry.addMapping("/**") registry.addMapping("/**")
.allowedOrigins("http://localhost:5173") .allowedOrigins(origin)
.allowedMethods("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS") .allowedMethods("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS")
.allowedHeaders("Authorization", "Content-Type") .allowedHeaders("Authorization", "Content-Type")
.maxAge(3600) // 1 hour .maxAge(3600) // 1 hour

View File

@ -37,3 +37,5 @@ management:
tracing: tracing:
transport: ${OTLP_TRACING_PROTOCOL} transport: ${OTLP_TRACING_PROTOCOL}
endpoint: ${OTLP_TRACING_ENDPOINT} endpoint: ${OTLP_TRACING_ENDPOINT}
cors-origin: ${CORS_ORIGIN}

View File

@ -44,4 +44,6 @@ jdbc:
management: management:
tracing: tracing:
sampling: sampling:
probability: 1 probability: 1
cors-origin: "http://localhost:5173"