NutsNews Backend Cloudflare Routing
Section titled “NutsNews Backend Cloudflare Routing”This documents the backend routing model for backend.nutsnews.com.
Summary
Section titled “Summary”The backend uses Cloudflare-managed DNS with a DNS-only A record:
| Name | Type | Target | Proxied |
|---|---|---|---|
backend.nutsnews.com | A | 65.75.201.18 | false |
DNS-only is the reviewed first phase. It keeps SSH separate from Cloudflare HTTP proxying, lets Caddy manage a public origin certificate, and avoids enabling Cloudflare edge proxy behavior before backend app routes and edge policy are designed.
Origin Health
Section titled “Origin Health”The backend protected apply installs Caddy and serves:
/healthz -> okAll other public paths return 404 until a reviewed backend app deployment owns
them.
Apply Path
Section titled “Apply Path”Backend repo workflows:
Protected Backend Ansible Applyinstalls Caddy, opens reviewed HTTP/HTTPS ports, and verifies direct-origin health.Backend Cloudflare Routingchecks, applies, or rolls back the Cloudflare DNS record through the protectedproduction-backendEnvironment.
DNS apply mode verifies the origin first with:
curl --resolve backend.nutsnews.com:80:65.75.201.18 http://backend.nutsnews.com/healthzVerification
Section titled “Verification”dig +short backend.nutsnews.com Acurl -fsS https://backend.nutsnews.com/healthzcurl -Iv https://backend.nutsnews.com/healthzExpected health response:
okRollback
Section titled “Rollback”Run Backend Cloudflare Routing with run_mode=rollback and
confirm_apply=backend.nutsnews.com. If the origin listener also needs removal,
revert the backend routing PR and run the protected backend Ansible check/apply
path.
