Skip to content

Conversation

@yechan-kim
Copy link
Member

@yechan-kim yechan-kim commented Mar 2, 2025

✅ PR 유형

어떤 변경 사항이 있었나요?

  • 새로운 기능 추가
  • 버그 수정
  • 리팩토링
  • 코드에 영향을 주지 않는 변경사항(주석, 개행 등등..)
  • 문서 수정
  • 빌드 부분 혹은 패키지 매니저 수정
  • 테스트 코드 추가

✏️ 작업 내용

S3 버킷 구조를 다음과 같이 폴더 구조를 변경합니다.

Note

Amazon S3 버킷은 /을 통해 폴더의 계층 구조를 구별하기 때문에, 코드에서 /을 사용해서, 구조를 변경하였습니다.

AS-IS

📦s3_bucket
┣ 🖼️invitation_thumbnail (random uuid+ title)
┗ 🖼️invitation_QRCode (invitation id)

TO-BE

📦s3_bucket
┣ 📂thumbnail
┃ ┗ 🖼️invitation_thumbnail (random uuid+ title)
┣ 📂QRCode
┃ ┗ 📂(invitation_id)
┃ ┃ ┗🖼️invitation_QRCode (invitation name)

초대장 썸네일 파일 구조 변경

image
image

초대장 QR 코드 파일 구조 변경

image
image

  • 로직 변경으로 인해 수정이 필요한 테스트 코드로 수정 완료했습니다.
    image

  • 아래의 로그와 같이, 크롤링 봇이 의도치 않은 요청을 보내, 의도치 않은 오류가 발생하고 있었습니다.
    이를 해결 위해, /login엔드포인트에서 POST을 제외한 모든 http method를 차단합니다.

196.251.85.250 - - [02/Mar/2025:12:06:05 +0000] "GET /login.rsp HTTP/1.1" 301 169 "-" "Hello World" "-"
196.251.85.250 - - [02/Mar/2025:12:06:05 +0000] "GET /login.rsp HTTP/1.1" 301 169 "-" "Hello World"

image


🔗 관련 이슈


💡 추가 사항

  • 초대장 썸네일은 presignedUrl을 통해, S3 버킷에 저장되기 때문에, invitationId가 생성되기 전에 해당 url이 발급이 됩니다. 따라서 부득이하게 invitation별로 관리를 하지 못하게 되었습니다.
  • QR 코드 같은 경우에는 사용자가 직접 다운로드를 하는 파일이기 때문에, 파일 관리의 용이성을 위해 invitation이름으로 파일을 저장할 수 있도록 위와 같은 구조로 관리합니다.

- 초대장 QR 생성 시기를 초대장 생성 이후로 변경
- 초대장 제목을 기반으로 초대장 QR 생성
- `POST`를 제외한 모든 접근 제한
@yechan-kim yechan-kim added ♻️ refactor 코드 리팩토링 ✅ test 테스트 코드 labels Mar 2, 2025
@yechan-kim yechan-kim requested review from 1winhyun and jwnnoh March 2, 2025 12:53
@yechan-kim yechan-kim self-assigned this Mar 2, 2025
@yechan-kim yechan-kim linked an issue Mar 2, 2025 that may be closed by this pull request
1 task
@github-actions
Copy link

github-actions bot commented Mar 2, 2025

Test Results

67 tests   67 ✅  2s ⏱️
31 suites   0 💤
31 files     0 ❌

Results for commit a1d3012.

♻️ This comment has been updated with latest results.

Copy link
Member

@1winhyun 1winhyun left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!!

@yechan-kim yechan-kim merged commit e5002d4 into main Mar 4, 2025
2 checks passed
@yechan-kim yechan-kim deleted the refactor/#45 branch March 4, 2025 09:24
@yechan-kim yechan-kim removed the request for review from jwnnoh March 4, 2025 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

♻️ refactor 코드 리팩토링 ✅ test 테스트 코드

Projects

None yet

Development

Successfully merging this pull request may close these issues.

♻️ S3 버킷 파일 구조 변경

3 participants