Skip to content

앱 WebSocket endpoint 추가#66

Merged
cfcromn merged 3 commits intodevelopfrom
fix/sockjs
Dec 28, 2025
Merged

앱 WebSocket endpoint 추가#66
cfcromn merged 3 commits intodevelopfrom
fix/sockjs

Conversation

@cfcromn
Copy link
Collaborator

@cfcromn cfcromn commented Dec 28, 2025

💡 배경 및 개요

앱 WebSocket endpoint 추가

Resolves: #{이슈번호}

📃 작업내용

앱 WebSocket endpoint 추가

🙋‍♂️ 리뷰노트

구현 시에 고민이었던 점들 혹은 특정 부분에 대한 의도가 있었다면 PR 리뷰의 이해를 돕기 위해 서술해주세요!

또한 리뷰어에게 특정 부분에 대한 집중 혹은 코멘트 혹은 질문을 요청하는 경우에 작성하면 좋아요!

e.g. 작업을 끝내야할 시간이 얼마 없어 확장성보다는 동작을 위주로 만들었어요! 감안하고 리뷰해주세요!

✅ PR 체크리스트

템플릿 체크리스트 말고도 추가적으로 필요한 체크리스트는 추가해주세요!

  • 이 작업으로 인해 변경이 필요한 문서가 변경되었나요? (e.g. .env, 노션, README)
  • 이 작업을 하고나서 공유해야할 팀원들에게 공유되었나요? (e.g. "API 개발 완료됐어요", "환경값 추가되었어요")
  • 작업한 코드가 정상적으로 동작하나요?
  • Merge 대상 브랜치가 올바른가요?
  • PR과 관련 없는 작업이 있지는 않나요?

🎸 기타

@gemini-code-assist
Copy link

Summary of Changes

Hello @cfcromn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 실시간 통신을 지원하기 위해 애플리케이션에 새로운 WebSocket 엔드포인트인 /ws-stomp를 도입합니다. 이 개선 사항은 로컬 개발 환경과 배포된 인스턴스를 포함한 다양한 클라이언트 환경에서 WebSocket 연결을 처리하는 애플리케이션의 기능을 확장합니다.

Highlights

  • 새로운 WebSocket 엔드포인트 추가: 애플리케이션에 /ws-stomp라는 새로운 WebSocket 엔드포인트를 추가했습니다.
  • 허용된 Origin 구성: 새로운 /ws-stomp 엔드포인트에 대해 http://localhost:8080, http://localhost:3000, https://port-0-gami-server-mj0rdvda8d11523e.sel3.cloudtype.app, http://localhost:5173, https://cklob-gami.vercel.app를 포함한 여러 Origin을 허용하도록 구성했습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이 PR은 앱을 위한 새로운 WebSocket 엔드포인트 /ws-stomp를 추가하는 작업을 담고 있습니다. 코드 변경 사항을 검토한 결과, 몇 가지 개선점과 중요한 수정 사항을 발견했습니다.

가장 시급한 문제는 SecurityConfig.java 파일에 새로운 엔드포인트 /ws-stomp에 대한 접근 권한 설정이 누락된 점입니다. 현재 설정은 /ws/** 경로만 허용하고 있어, 이대로 병합되면 새로운 엔드포인트가 보안 필터에 의해 차단되어 동작하지 않을 것입니다. SecurityConfig.requestMatchers("/ws-stomp/**").permitAll()과 같은 규칙을 추가하여 문제를 해결해야 합니다. 이는 critical한 문제입니다.

또한, WebSocketConfig.java 파일에서 허용된 출처(allowed origins) 목록이 두 엔드포인트에 걸쳐 중복으로 하드코딩되어 있습니다. 이는 유지보수를 어렵게 만들 수 있으므로, 해당 목록을 상수로 추출하거나 application.yml 같은 설정 파일로 옮겨 관리하는 것이 좋습니다.

마지막으로, PR의 변경 사항은 아니지만 코드베이스 전반의 보안 강화를 위해 한 가지 제안을 드립니다. application.yml 파일에 데이터베이스 비밀번호, JWT 시크릿 키, Discord 웹훅 URL과 같은 민감한 정보가 기본값으로 하드코딩되어 있습니다. 이는 보안에 매우 취약한 방식이므로, 환경 변수나 외부 설정 관리 도구를 사용하도록 수정하는 것을 강력히 권장합니다.

@cfcromn cfcromn merged commit 0f18d28 into develop Dec 28, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant