91d0fcd023
document-caddy 가 home-caddy 로부터 받은 X-Forwarded-Proto: https 를 신뢰하지 않고 incoming scheme (http) 로 덮어써 FastAPI 가 받은 proto 가 http 로 인식 → /api/documents 307 Location 헤더가 http:// 로 나가 HTTPS 페이지에서 mixed-content block. private_ranges 를 trusted_proxies 로 설정해 docker bridge 내부의 home-caddy 가 전달한 X-Forwarded-* 를 보존. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
46 lines
1.0 KiB
Caddyfile
46 lines
1.0 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 {
|
|
encode gzip
|
|
|
|
# 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
|
|
}
|
|
}
|
|
}
|