Skip to content

jwt: 권한이 필요없는 endpoint는 필터 안거치도록 수정#40

Merged
hongjm0912 merged 1 commit into
developfrom
feat/endpoint
Dec 28, 2025
Merged

jwt: 권한이 필요없는 endpoint는 필터 안거치도록 수정#40
hongjm0912 merged 1 commit into
developfrom
feat/endpoint

Conversation

@ZaMan0806

Copy link
Copy Markdown
Collaborator

개요

권한이 필요없는 endpoint에 대해서는 jwt 필터를 적용하지 않도록 수정하였습니다.

@ZaMan0806 ZaMan0806 requested a review from hongjm0912 December 28, 2025 05:43
@ZaMan0806 ZaMan0806 self-assigned this Dec 28, 2025
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @ZaMan-O, 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은 API의 접근성과 효율성을 개선하기 위해 JWT 필터의 동작 방식을 수정합니다. 기존에는 모든 요청에 JWT 필터가 적용되었으나, 이제는 인증이 필요 없는 공개적인 엔드포인트나 사전 인증 단계의 엔드포인트에 대해서는 필터링을 건너뛰도록 하여 불필요한 인증 절차를 생략하고 요청 처리 흐름을 최적화합니다.

Highlights

  • JWT 필터 예외 처리: 권한이 필요 없는 특정 엔드포인트에 대해 JWT 필터가 적용되지 않도록 JwtHeaderFiltershouldNotFilter 메서드를 추가하여 예외 처리 로직을 구현했습니다.
  • 인증 관련 엔드포인트 제외: 회원가입, 로그인, 인증 확인, 구글/카카오 소셜 로그인 등 /api/v1/auth/* 경로의 엔드포인트는 JWT 필터에서 제외됩니다.
  • 조회성 GET 요청 제외: 메인 페이지, 프로필, 포트폴리오 조회/댓글, 블로그 조회/댓글 등 특정 조회성 GET 요청에 대해서도 JWT 필터가 적용되지 않도록 설정했습니다.
  • OPTIONS 요청 처리: CORS 사전 요청(preflight request)에 사용되는 HTTP OPTIONS 메서드 요청도 JWT 필터에서 제외되도록 처리했습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

이번 PR은 인증이 필요 없는 엔드포인트에서 JWT 필터를 건너뛰도록 수정하는 내용이네요. shouldNotFilter 메서드를 구현하여 특정 경로에 대한 필터 적용을 제외하는 접근 방식은 타당합니다. 하지만 현재 구현은 SecurityConfig에 정의된 경로와 중복되어 유지보수성을 저해할 수 있고, 코드 가독성 측면에서 개선의 여지가 있습니다. 아래 리뷰 댓글에서 AntPathMatcherList를 사용하여 코드를 더 깔끔하고 효율적으로 개선하는 방법을 제안드렸습니다. 이를 통해 향후 경로 관리가 더 쉬워질 것입니다.

@hongjm0912 hongjm0912 merged commit 47e6873 into develop Dec 28, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants