Skip to content

Conversation

@chanwonlee
Copy link
Contributor

관련 Issue (필수)

주요 변경 사항 (필수)

  • security cors 설정 추가

리뷰어 참고 사항

없음

추가 정보

없음

PR 작성 체크리스트 (필수)

  • 제목이 Issue와 동일함을 확인했습니다.
  • 리뷰어를 지정했습니다.
  • 프로젝트를 연결했습니다.

@chanwonlee chanwonlee merged commit 5f0325b into main Sep 11, 2025
2 checks passed
@github-project-automation github-project-automation bot moved this to Done in 💙 BE Sep 11, 2025
Copy link
Contributor

@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.

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.ymlserver.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

  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
Contributor

@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은 어드민 페이지와 전역 보안 설정에 CORS(Cross-Origin Resource Sharing) 구성을 추가하는 변경 사항을 담고 있습니다. 전반적으로 CORS를 올바르게 적용하려는 의도는 좋으나, 몇 가지 개선점이 보입니다.

주요 피드백:

  • SecurityConfig에 포함된 디버그 설정은 프로덕션 환경에서 보안 위험과 성능 저하를 유발할 수 있으므로 제거해야 합니다.
  • application-prod.yml의 CORS 설정에서 allowed-origins를 YAML 리스트 형식으로 변경하여 가독성과 유지보수성을 높이는 것을 제안합니다.

자세한 내용은 각 파일의 인라인 코멘트를 참고해주세요.


@Configuration
@EnableWebSecurity
@EnableWebSecurity(debug = true)
Copy link
Contributor

Choose a reason for hiding this comment

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

high

@EnableWebSecurity(debug = true) 설정은 프로덕션 환경에서 보안 및 성능 문제를 야기할 수 있습니다. 디버깅 목적으로 사용된 것이라면, 프로덕션 배포 전에는 반드시 제거해야 합니다. 이 설정은 Spring Security의 모든 내부 필터 체인 디버그 로그를 활성화하여 민감한 정보가 노출될 수 있고, 로깅 오버헤드로 인해 성능이 저하될 수 있습니다.

Suggested change
@EnableWebSecurity(debug = true)
@EnableWebSecurity


cors:
allowed-origins: https://200-cherry.vercel.app
allowed-origins: https://200-cherry.vercel.app,https://server.200-cherry.shop
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

allowed-origins를 쉼표로 구분된 문자열로 관리하는 것보다 YAML의 리스트 형식을 사용하는 것이 가독성과 유지보수성 측면에서 더 좋습니다. 대괄호를 사용하여 명시적으로 리스트임을 표현하면, 각 origin을 명확하게 구분할 수 있고, 나중에 추가/삭제할 때 실수를 줄일 수 있습니다.

  allowed-origins: [https://200-cherry.vercel.app, https://server.200-cherry.shop]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants