b73a5cc601
- AIModelConfig.protocol 판별자 신설(기본 tei = 무회귀), llamacpp = /v1/rerank 요청·응답 스키마 정규화(ai/rerank_protocol.py 순수함수 + 단위테스트 4) - OCR_ENABLED/STT_ENABLED 명시 게이트 — GPU CUDA 서비스(Surya/faster-whisper) 폐기 대응, silent 아님(경고 로그 + extract_meta 터미널 기록) - DS Caddyfile request_body 100MB — 413 정책을 edge(home-caddy)에서 내부로 재홈 (DSM 리버스 프록시 전환 대비, upload.max_bytes 정합) - SSE X-Accel-Buffering는 기점검 결과 기구현(eid_chat)이라 무변경 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
77 lines
2.4 KiB
Caddyfile
77 lines
2.4 KiB
Caddyfile
{
|
|
auto_https off
|
|
# home-caddy (docker bridge 사설망) 가 TLS 를 종단하고 X-Forwarded-Proto: https
|
|
# 를 전달. trusted_proxies 없으면 Caddy 가 incoming scheme (http) 로 덮어써
|
|
# FastAPI 307 redirect 의 Location 헤더가 http:// 로 나가 mixed-content block.
|
|
servers {
|
|
trusted_proxies static private_ranges
|
|
}
|
|
}
|
|
|
|
http://document.hyungi.net {
|
|
# 명시 Content-Type match — 기본 match 의 text/* 는 text/event-stream 까지 포함해
|
|
# SSE(/api/eid/chat)의 첫 ~512B 를 gzip 버퍼링함. SSE 제외, 기존 압축 대상은 보존.
|
|
# (응답 매처는 header <필드> <값> 한 쌍씩 — 여러 줄 = OR. 한 줄 다중 값은 파싱 에러)
|
|
# 2026-06-20 보안 헤더 (M: 클릭재킹·MIME 스니핑 방어). HSTS 는 TLS 종단 edge(home-caddy) 소관.
|
|
header {
|
|
X-Content-Type-Options nosniff
|
|
X-Frame-Options SAMEORIGIN
|
|
Referrer-Policy strict-origin-when-cross-origin
|
|
-Server
|
|
}
|
|
|
|
# 2노드 이관(2026-07-02): 업로드 100MB 한도 집행을 edge(home-caddy)에서 DS 내부로 재홈.
|
|
# 인그레스가 DSM 리버스 프록시(한도 GUI 미노출)로 바뀌어도 413 단일 소스 유지.
|
|
# config.yaml upload.max_bytes(100000000)와 정합.
|
|
request_body {
|
|
max_size 100MB
|
|
}
|
|
|
|
encode {
|
|
gzip
|
|
match {
|
|
header Content-Type text/html*
|
|
header Content-Type text/css*
|
|
header Content-Type text/plain*
|
|
header Content-Type text/xml*
|
|
header Content-Type text/javascript*
|
|
header Content-Type application/json*
|
|
header Content-Type application/javascript*
|
|
header Content-Type application/xml*
|
|
header Content-Type image/svg+xml*
|
|
}
|
|
}
|
|
|
|
# API + 문서 → FastAPI
|
|
handle /api/* {
|
|
reverse_proxy fastapi:8000
|
|
}
|
|
handle /docs {
|
|
reverse_proxy fastapi:8000
|
|
}
|
|
handle /openapi.json {
|
|
reverse_proxy fastapi:8000
|
|
}
|
|
handle /health {
|
|
reverse_proxy fastapi:8000
|
|
}
|
|
handle /setup {
|
|
reverse_proxy fastapi:8000
|
|
}
|
|
|
|
# 프론트엔드
|
|
handle {
|
|
reverse_proxy frontend:3000
|
|
}
|
|
}
|
|
|
|
# Synology Office 프록시
|
|
http://office.hyungi.net {
|
|
reverse_proxy https://ds1525.hyungi.net:5001 {
|
|
header_up Host {upstream_hostport}
|
|
transport http {
|
|
tls_insecure_skip_verify
|
|
}
|
|
}
|
|
}
|