Skip to content
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

fix: 쿠키 적용 후 개발서버에서 에러 발생하는 문제 해결 #259

Merged
merged 9 commits into from
Jan 31, 2024

Conversation

uwoobeat
Copy link
Member

@uwoobeat uwoobeat commented Jan 30, 2024

🌱 관련 이슈

📌 작업 내용 및 특이사항

  • 스웨거 시큐리티 스키마 활성화 처리해서 API 요청 날릴 떄 헤더 포함되도록 세팅했습니다.
  • 헤더 가져와서 Bearer prefix 떼주는 부분에서 NPE 발생하는 이슈 있어서, Optional로 감싸줬습니다.
    • p.s. 오늘 서버에서 503 터지는 이슈 있어서 서버 로그 확인해보니 누군가 NPE를 마구마구 터트리고 있어서... 서버가 공격당하는 줄 알고 식겁했지만... 알고보니 헬스체크를 정기적으로 날리는 LB였고... 헬스체크 API에서 NPE가 터지고 있어서 해당 이슈가 발생하는 거였습니다...
  • 시큐리티 유틸리티에서 익명 유저로 로그인하는 경우 getName() 호출할 때 memberId가 아니라 문자열이 들어오기 때문에, try-catch로 감싸줬습니다.
  • 또한 시큐리티 유틸에서 PrincipalDetails 로 캐스팅하는 방법 대신 Authentication 인터페이스가 제공하는 getName() 사용해서 좀 더 우아하게 처리해줬습니다.

📝 참고사항

📚 기타

@uwoobeat uwoobeat marked this pull request as ready for review January 31, 2024 12:48
Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

69 New issues
0 Security Hotspots
51.4% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@char-yb char-yb left a comment

Choose a reason for hiding this comment

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

LGTM
고생많았습니당:)

@uwoobeat uwoobeat merged commit c4c7703 into develop Jan 31, 2024
2 checks passed
@github-actions github-actions bot added the merged 머지된 PR label Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged 머지된 PR
Projects
Status: 완료
2 participants