Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a new Vercel deployment URL to the allowed origin patterns in the WebSocket configuration. The review feedback suggests externalizing these hardcoded URLs into a configuration file to prevent duplication and inconsistencies between the WebConfig and WebSocketConfig classes.
| "https://z-igma.netlify.app", | ||
| "https://z-igma.vercel.app" |
There was a problem hiding this comment.
허용된 오리진(Allowed Origins) 목록을 소스 코드에 직접 하드코딩하는 대신, application.yml과 같은 설정 파일로 분리하여 관리하는 것을 권장합니다.
현재 WebConfig와 WebSocketConfig 두 곳에서 동일한 URL 목록을 중복 관리하고 있어 유지보수 시 누락될 위험이 있습니다. 또한, WebConfig에는 포함되지 않은 http://localhost:8080이 WebSocketConfig에만 명시되어 있는 등 설정의 불일치가 발견됩니다.
@Value 또는 @ConfigurationProperties를 사용하여 설정 파일로부터 오리진 목록을 주입받아 두 설정 클래스에서 공통으로 사용하면 일관성을 유지하고 관리를 단순화할 수 있습니다.
예시:
# application.yml
app:
cors:
allowed-origins:
- http://localhost:5173
- http://localhost:8080
- https://z-igma.netlify.app
- https://z-igma.vercel.app
🔍 관련 이슈
✅ 작업 분류
✨ 작업 내용
👥 전달사항
✅ 체크리스트
📸 스크린샷
💡 배운 것 / 시도한 것 / 고민한 점