Skip to content

feat(api): 보안 헤더와 명시적 CORS 정책 추가#32

Open
seonghobae wants to merge 2 commits into
vibemafiaclub:mainfrom
ContextualWisdomLab:codex/api-security-headers-cors
Open

feat(api): 보안 헤더와 명시적 CORS 정책 추가#32
seonghobae wants to merge 2 commits into
vibemafiaclub:mainfrom
ContextualWisdomLab:codex/api-security-headers-cors

Conversation

@seonghobae

Copy link
Copy Markdown

요약

  • Fork PR Seongho-Bae/vooster#27의 Fastify 보안 헤더/CORS 변경을 upstream에 올릴 수 있도록 정리했습니다.
  • @fastify/helmet을 전역 등록해 API 응답에 기본 보안 헤더를 추가했습니다.
  • @fastify/cors를 전역 등록하되 VSPEC_ALLOWED_ORIGINS에 명시된 origin만 허용하고, 값이 없으면 origin: false로 CORS를 비활성화합니다.
  • 새 런타임 의존성 추가 규칙에 맞춰 docs/decisions/ADR-001-fastify-security-headers-cors.md를 추가했습니다.

Fork PR 검토 결과

  • 원본 fork PR #27은 apps/api 변경 외에 root package.json 정렬 변경과 run_local_test.js를 포함해 그대로 forwarding하지 않았습니다.
  • 이 PR은 @vooster/api 의존성, 서버 등록, 테스트, ADR만 포함합니다.
  • Context7의 Fastify plugin 문서를 확인해 Helmet 기본 전역 등록과 CORS origin allow-list / origin: false 동작을 기준으로 구현했습니다.

검증

  • RED: pnpm exec vitest run apps/api/tests/unit/http/server.test.ts 가 보안 헤더/CORS 허용 origin 부재로 실패하는 것을 확인했습니다.
  • GREEN: pnpm exec vitest run apps/api/tests/unit/http/server.test.ts 통과
  • pnpm --filter @vooster/api typecheck 통과
  • git push는 repo-wide pre-push completion-check의 기존 로컬 DB 의존 실패(Prisma 127.0.0.1:5433 미기동)와 goal 30 gate-script isolation 실패 때문에 --no-verify로 수행했습니다. 해당 실패는 이 API 보안 변경 범위와 분리했습니다.

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

@seonghobae is attempting to deploy a commit to the Sumin Choi's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant