1# Caddy serves release downloads uncompressed, revalidated like pages2# (they can be published again under their tag), and as attachments, since3# anyone's files are on the forge's own origin. So does the edge from the4# mirror, where a download is a file whatever its name.5. "$(dirname "$0")/../lib.sh"6forge server caddyfile git.test >"$T/Caddyfile" 2>"$T_LOG" || fail "caddyfile"7has "$T/Caddyfile" '@compress not path_regexp \^/\[\^/\]\+/\[\^/\]\+/releases/download/$'8has "$T/Caddyfile" 'encode @compress \{'9has "$T/Caddyfile" 'header @download Content-Disposition attachment'10has "$T/Caddyfile" 'header @fresh Cache-Control no-cache'11lacks "$T/Caddyfile" 'releases.*immutable'12e=$T_HOME/deploy/edge/Caddyfile13has "$e" 'not path_regexp \^/\[\^/\]\+/\[\^/\]\+/releases/download/\.$'14has "$e" 'header @download Content-Disposition attachment'15if command -v caddy >/dev/null 2>&1; then16 ok caddy adapt --config "$T/Caddyfile" --adapter caddyfile17 FORGE_DOMAIN=src.test FORGE_MIRROR_URL=https://mirror.test ok caddy adapt --config "$e" --adapter caddyfile18fi