{
	# پنل مدیریت Caddy لازم نیست — سطح حمله کمتر
	admin off
}

:80 {
	root * /srv
	encode zstd gzip

	# مسیریابی SPA — مسیرهای ناشناخته به index.html برمی‌گردند
	try_files {path} /index.html
	file_server

	# فایل‌های هش‌دار بیلد: کش بلندمدت بی‌رحم
	@assets path /assets/*
	header @assets Cache-Control "public, immutable, max-age=31536000"

	# بقیه (از جمله index.html و fallback اسپا): بدون کش مرورگر تا هر استقرار فوری دیده شود
	@notassets not path /assets/*
	header @notassets Cache-Control "no-cache"
}
