# BillCare — exdev Caddy 서브도메인 스니펫
# host 포트 83 → billcare-frontend
# 실제 적용: ex-chatbot-stack Caddyfile.exdev 에 병합 후 caddy reload

(billcare_upstream) {
	reverse_proxy host.docker.internal:{$BILLCARE_HOST_PORT:83} {
		flush_interval -1
		transport http {
			read_timeout 120s
			write_timeout 120s
			versions 1.1 2
		}
		header_up Host {host}
		header_up X-Real-IP {remote_host}
		header_up X-Forwarded-For {remote_host}
		header_up X-Forwarded-Proto {scheme}
	}
}

https://{$BILLCARE_DOMAIN:billcare.exdev.co.kr} {
	# 공유 cert SAN 에 없을 수 있음 → Caddy 자체 ACME(TLS-ALPN) 사용
	handle {
		import billcare_upstream
	}
}
