Commit Graph

4 Commits

Author SHA1 Message Date
cc9884bdfe fix: 아키텍처 리뷰 HIGH/MEDIUM 이슈 10건 수정
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 34s
Server CI/CD / deploy (push) Successful in 50s
HIGH (3건):
- 런처 파일 업로드 시 PE 헤더 검증 + 500MB 크기 제한 추가
- 체인 노드 URL 파싱 시 scheme/host 유효성 검증
- Dockerfile 비루트 사용자(app:1000) 실행

MEDIUM (7건):
- SSAFY username 충돌 시 랜덤 suffix로 최대 3회 재시도
- 내부 API username 검증 validID(256자) → validUsername(3~50자) 분리
- 동시 업로드 경합 방지 sync.Mutex 추가
- 프로덕션 환경변수 검증 강화 (DB_PASSWORD, OPERATOR_KEY_HEX, INTERNAL_API_KEY)
- Redis 에러 시 멱등성 요청 통과 → 503 거부로 변경
- CORS AllowOrigins 환경변수화 (CORS_ALLOW_ORIGINS)
- Refresh 엔드포인트 rate limiting 추가 (IP당 5 req/min)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 15:56:58 +09:00
e16e1b5e0a feat: recover 미들웨어 추가 (패닉 시 스택트레이스 출력)
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 35s
Server CI/CD / deploy (push) Successful in 54s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:56:33 +09:00
f50b629d59 Fix: CORS AllowHeaders에 X-Requested-With 추가
Some checks failed
Server CI/CD / lint-and-build (push) Waiting to run
Server CI/CD / deploy (push) Has been cancelled
웹 클라이언트의 fetch 요청에서 X-Requested-With 헤더가
CORS preflight에서 차단되는 문제 수정.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 17:02:56 +09:00
fa03673e9c refactor: main.go 서버 초기화 로직을 internal/server/server.go로 분리
Fiber 앱 설정, 미들웨어, rate limiter를 server 패키지로 추출.
main.go는 DB 연결, DI, 서버 시작, graceful shutdown만 담당.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 17:11:13 +09:00