generated from ttipo/project-base
feat(docker): 12단계 계정 보안 — 엔진 웹훅 · /api/internal 닫기 · 요청 대상 400
메일 프로그램(IMAP · SMTP) 로그인 기록을 엔진 웹훅으로 받는다. - 루트 env MAIL_WEBHOOK_SECRET(setup · backend 공용, 운영 필수)과 backend 의 APP_NETWORK_SUBNET - setup 이 엔진 웹훅을 맞추고(표시 머리글 — 소금 + 키 지문) 서명한 빈 묶음으로 받는 곳을 확인한다 키를 바꾼 실행 · 게이트웨이 OTP · 테스트 직원의 402 를 따로 다룬다 - nginx 두 server 가 /api/internal/ 을 닫고, 요청 대상의 날 \(경로) · # · 0x80 이상은 location 전에 400 Express 가 이런 대상을 다시 읽어 닫은 경로(/api/internal · /api/health)가 백엔드에서 열렸다(2026-10-31 리뷰) - CI "닫는 경로 시험"(두 server × 세 경로의 변형) · 지시어만 세는 정적 검사 - mail/README: 웹훅 · 12단계 전부터 운영 중인 서버를 올리는 차례 · 휴대폰을 잃은 직원(관리 API 명령) 엔진 DNS 가 Custom(운영)이어도 웹훅은 backend 를 푼다 — 메일 컨테이너가 도커 DNS 를 쓴다(개발에서 확인). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -49,11 +49,13 @@ COPY nginx.conf /etc/nginx/templates/default.conf.template
|
||||
# 템플릿 값 계산 (루트 env 의 첨부·업로드 한도 → nginx 본문 한도, 공개 내려받기 호스트). 실행 권한이 있어야 entrypoint 가 source 한다
|
||||
COPY --chmod=755 nginx-env.envsh /docker-entrypoint.d/16-nginx-env.envsh
|
||||
# 두 server(포털 · 공개 내려받기 — 11단계)가 include 하는 location 묶음. 템플릿이 아니다 — envsubst 를 거치지 않고 그대로 읽는다.
|
||||
# share-open · share-closed 는 server 단계(화면 /s/), share-api-open · share-api-closed 는 /api/ 블록 안(공개 API — 대소문자를 가리지 않는다)
|
||||
# share-open · share-closed 는 server 단계(화면 /s/), share-api-open · share-api-closed 는 /api/ 블록 안(공개 API — 대소문자를 가리지 않는다),
|
||||
# internal-api-closed 는 /api/ 블록 안(엔진만 부르는 /api/internal/ 을 닫는다 — 12단계, 두 server 모두)
|
||||
COPY nginx-share-open.conf /etc/nginx/snippets/share-open.conf
|
||||
COPY nginx-share-closed.conf /etc/nginx/snippets/share-closed.conf
|
||||
COPY nginx-share-api-open.conf /etc/nginx/snippets/share-api-open.conf
|
||||
COPY nginx-share-api-closed.conf /etc/nginx/snippets/share-api-closed.conf
|
||||
COPY nginx-internal-api-closed.conf /etc/nginx/snippets/internal-api-closed.conf
|
||||
COPY nginx-api-errors.conf /etc/nginx/snippets/api-errors.conf
|
||||
# 워커마다 연결 수 — 이미지 기본 1024 → 4096. 대용량 받기(버퍼링 끔 — 받기 하나가 연결 둘, 공개 400 · 앱 안 200 개까지) · 실시간 알림(브라우저마다 연결 둘을
|
||||
# 1시간) · 포털 요청이 함께 버티게 (nginx.conf 의 http 단계 "동시 연결 수"). 워커 하나에 몰려도 모자라지 않게 워커마다 잡는다.
|
||||
|
||||
Reference in New Issue
Block a user