아바타 이미지 조회 URL을 S3 Presigned URL로 발급 - #49
Merged
Merged
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
cfcromn
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ 작업 내용
아바타 이미지 URL을 조회 시점마다 S3 presigned URL로 발급하도록 변경했습니다. 기존에는 영구 공개 URL을 DB에 저장해 그대로 응답했지만, 이제는 조회할 때마다 만료 시간이 있는 서명된 URL을 새로 생성해 내려줍니다.
🔍 리뷰 시 참고사항
S3Presigner.presignGetObject()로 서명된 URL을 발급만 합니다.S3Presigner가 별도s3-presigner모듈이 아니라 기존s3모듈에 포함되어 있어, 별도 의존성 추가 없이 구현했습니다.aws.s3.presigned-url-expiration-seconds(S3_PRESIGNED_URL_EXPIRATION_SECONDS, 기본 3600초)로 설정 가능합니다.avatar.imageUrl에 저장되는 값의 포맷(toPublicUrl이 만드는 공개 URL 문자열)은 그대로 유지하고, 이 값에서 key를 추출해 presigned URL을 생성하는 방식이라 DB 마이그레이션은 필요 없습니다.mc anonymous set download)로 설정되어 있어, presigned URL 없이도 공개 URL로 직접 접근이 가능한 상태입니다. 실제로 만료를 강제하려면 버킷 공개 정책 제거가 추가로 필요하며, 이번 PR에서는 코드 변경만 다룹니다.✅ 체크리스트
.env.example등) 변경이 필요한 경우 작성 또는 수정했나요?