Merge pull request #29 from ktds-dg0501/feature/partici2

Feature/partici2
This commit is contained in:
kkkd-max 2025-10-30 12:25:44 +09:00 committed by GitHub
commit 5c365fe899
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 99 additions and 2 deletions

View File

@ -0,0 +1,38 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"app":"participation-service","app.kubernetes.io/managed-by":"kustomize","app.kubernetes.io/part-of":"kt-event-marketing","environment":"dev"},"name":"participation-service","namespace":"kt-event-marketing"},"spec":{"ports":[{"name":"http","port":80,"protocol":"TCP","targetPort":8084}],"selector":{"app":"participation-service","app.kubernetes.io/managed-by":"kustomize","app.kubernetes.io/part-of":"kt-event-marketing","environment":"dev"},"type":"ClusterIP"}}
creationTimestamp: "2025-10-28T08:59:06Z"
labels:
app: participation-service
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/part-of: kt-event-marketing
environment: dev
name: participation-service
namespace: kt-event-marketing
resourceVersion: "125107611"
uid: da5b7f82-37d3-41bd-ad87-e2864c8bcd18
spec:
clusterIP: 10.0.130.146
clusterIPs:
- 10.0.130.146
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8084
selector:
app: participation-service
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/part-of: kt-event-marketing
environment: dev
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}

View File

@ -0,0 +1,27 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: participation-service
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/part-of: kt-event-marketing
environment: dev
name: participation-service
namespace: kt-event-marketing
spec:
clusterIP: 10.0.130.146
clusterIPs:
- 10.0.130.146
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8084
selector:
app: participation-service
sessionAffinity: None
type: ClusterIP

View File

@ -24,7 +24,7 @@ import java.util.Arrays;
@EnableWebSecurity
public class SecurityConfig {
@Value("${cors.allowed-origins:http://localhost:*,https://kt-event-marketing-api.20.214.196.128.nip.io/api/v1}")
@Value("${cors.allowed-origins:*}")
private String allowedOrigins;
@Bean

View File

@ -0,0 +1,32 @@
package com.kt.event.participation.infrastructure.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* Web Configuration
* CORS 설정 기타 관련 설정
*
* @author System Architect
* @since 2025-10-30
*/
@Configuration
public class WebConfig implements WebMvcConfigurer {
/**
* CORS 설정
* - 모든 origin 허용 (개발 환경)
* - 모든 HTTP 메서드 허용
* - Credentials 허용
*/
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOriginPatterns("*")
.allowedMethods("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS")
.allowedHeaders("*")
.allowCredentials(true)
.maxAge(3600);
}
}

View File

@ -56,7 +56,7 @@ jwt:
# CORS 설정
cors:
allowed-origins: ${CORS_ALLOWED_ORIGINS:http://localhost:8081,http://localhost:8082,http://localhost:8083,http://localhost:8084,http://kt-event-marketing.20.214.196.128.nip.io}
allowed-origins: ${CORS_ALLOWED_ORIGINS:*}
allowed-methods: ${CORS_ALLOWED_METHODS:GET,POST,PUT,DELETE,OPTIONS,PATCH}
allowed-headers: ${CORS_ALLOWED_HEADERS:*}
allow-credentials: ${CORS_ALLOW_CREDENTIALS:true}