Add a "caddy" destination alongside "custom" for the new Caddy-based
custom-domains setup (elastic-infra ansible/vars/apps/custom-domains.yml).
It uploads the same files as the old external nginx server, but rewrites
the nginx SSI directives to Caddy template placeholders on upload, since
Caddy's templates directive injects the request hostname and the
proxy-product query parameters at serve time.
The caddy-ssi transform fails the deploy if a build contains stray Go
template delimiters or an SSI directive without a known replacement, so
a bad build cannot turn into per-request 500s. Uploads go via a temporary
file so the transformed bytes are what lands on the server, and the
post-upload verification compares against the transformed content.
A --caddy-only flag deploys exclusively to the new setup, leaving the CDN
and the old external server untouched during the migration.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ApznmYeffWY6YojKXhEJDW