-
Notifications
You must be signed in to change notification settings - Fork 0
[Release] v1.0.3 security cors 설정 추가 #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
Summary of Changes
Hello @chanwonlee, 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은 애플리케이션의 보안 구성을 개선하고 특히 CORS(Cross-Origin Resource Sharing) 정책을 강화하는 데 중점을 둡니다. 관리자 엔드포인트에 대한 CORS 지원을 활성화하고, 프로덕션 환경에서 허용되는 출처 목록을 확장하며, 프록시 환경에서 HTTP 헤더 처리를 올바르게 구성하여 애플리케이션의 접근성과 안정성을 향상시킵니다.
Highlights
- 관리자 보안 설정에 CORS 지원 추가:
/admin/**경로에 대한 CORS 설정을 활성화하여 교차 출처 요청을 허용합니다. - CORS 허용 출처 확장: 프로덕션 환경에서 CORS 허용 출처에
https://server.200-cherry.shop을 추가했습니다. - Spring Security 디버그 모드 활성화:
SecurityConfig에서 Spring Security의 디버그 모드를 활성화했습니다. - 프록시 환경을 위한 헤더 처리 설정:
application-prod.yml에server.forward-headers-strategy: FRAMEWORK를 추가하여 프록시 환경에서 전달된 헤더를 올바르게 처리하도록 설정했습니다.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| 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 issue 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
-
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. ↩
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.
Code Review
이 PR은 어드민 페이지와 전역 보안 설정에 CORS(Cross-Origin Resource Sharing) 구성을 추가하는 변경 사항을 담고 있습니다. 전반적으로 CORS를 올바르게 적용하려는 의도는 좋으나, 몇 가지 개선점이 보입니다.
주요 피드백:
SecurityConfig에 포함된 디버그 설정은 프로덕션 환경에서 보안 위험과 성능 저하를 유발할 수 있으므로 제거해야 합니다.application-prod.yml의 CORS 설정에서allowed-origins를 YAML 리스트 형식으로 변경하여 가독성과 유지보수성을 높이는 것을 제안합니다.
자세한 내용은 각 파일의 인라인 코멘트를 참고해주세요.
|
|
||
| @Configuration | ||
| @EnableWebSecurity | ||
| @EnableWebSecurity(debug = true) |
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.
|
|
||
| cors: | ||
| allowed-origins: https://200-cherry.vercel.app | ||
| allowed-origins: https://200-cherry.vercel.app,https://server.200-cherry.shop |
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.
관련 Issue (필수)
주요 변경 사항 (필수)
리뷰어 참고 사항
없음
추가 정보
없음
PR 작성 체크리스트 (필수)