Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
허용된 오리진(Allowed Origins) 목록을 소스 코드에 직접 하드코딩하는 대신,
application.yml과 같은 설정 파일로 분리하여 관리하는 것을 권장합니다.현재
WebConfig와WebSocketConfig두 곳에서 동일한 URL 목록을 중복 관리하고 있어 유지보수 시 누락될 위험이 있습니다. 또한,WebConfig에는 포함되지 않은http://localhost:8080이WebSocketConfig에만 명시되어 있는 등 설정의 불일치가 발견됩니다.@Value또는@ConfigurationProperties를 사용하여 설정 파일로부터 오리진 목록을 주입받아 두 설정 클래스에서 공통으로 사용하면 일관성을 유지하고 관리를 단순화할 수 있습니다.예시: