Security — TLS, WAF and origin protection
On-demand TLS with ACME, domain-approval policy and Geston, mTLS to the origin, Coraza WAF, rate limiting, security headers and origin protection.
VeloFlux protects traffic in three layers: TLS between client and edge, WAF and rate limiting at the edge, and TLS/mTLS between the edge and your origin.
On-demand TLS (automatic)#
TLS certificates are issued and renewed automatically via ACME (Let's Encrypt), with Caddy/CertMagic at the edge. Certificate storage is on the filesystem or S3/MinIO (with a Redis lock), and DNS-01 via Cloudflare is optional.
- Provisioning: happens after domain verification.
- Renewal: automatic, before expiry.
- Coverage: supports wildcard and multi-domain.
- Protocol: TLS 1.2 and 1.3.
Approval policy (on-demand ask)
On-demand issuance is not open to any host. The DecisionFunc approves the host when:
- it is in the allowlist (
ALLOWED_HOSTS), or - the external approval endpoint (
ACME_ON_DEMAND_ASK_URL?domain=..., cached in Redis) approves it.
In the control plane, GET /api/edge/tls/ask approves only existing domains with a routable status (active/verified).
Geston as domain authority
For Geston-managed domains, VeloFlux queries Geston on demand for certificate and route authorization. Geston is the domain authority in those cases — do not manually register Geston customer domains in VeloFlux.
Certificate status
Check Domains → [your domain] → SSL Status:
| Status | Meaning |
|---|---|
| Valid | Certificate active and valid |
| Pending | Provisioning in progress |
| Error | Check DNS and the CNAME |
mTLS and TLS to the origin#
Transport from the edge to the upstream supports:
- Validation by custom CA (
UPSTREAM_TLS_ROOT_CA_FILE). - Client mTLS authentication (
UPSTREAM_TLS_CLIENT_CERT_FILE+UPSTREAM_TLS_CLIENT_KEY_FILE). - SNI override (
UPSTREAM_TLS_SERVER_NAME). UPSTREAM_INSECURE_SKIP_VERIFYis blocked by the production guard rails.
WAF#
The proxy applies the Coraza WAF in the middleware pipeline, before rate limiting and the reverse proxy. In production, proxy boot is blocked if no WAF rule is configured (WAF_RULES_FILE or WAF_RULES_INLINE).
Rate limiting#
Rate limiting is applied per host + IP, with dynamic Redis or in-memory storage. Per-plan API limits are in API reference. If a legitimate client gets 429 Too Many Requests, see Troubleshooting.
Security headers and pipeline#
The proxy middleware pipeline, in order:
- Request context (
X-Request-ID+ metadata) - Security headers
- CORS
- Body limit
- Coraza WAF
- Metrics + inflight (if enabled)
- Rate limit (dynamic Redis or memory)
- Structured access log
- Reverse proxy handler
HttpOnly sessions, CORS, headers and payload limits also apply in the control plane.
Origin protection#
- The edge is the only public entry point: the origin does not need to expose ports directly to the internet.
- Rate limiting, WAF and local mitigation happen at the edge, before touching your backend.
- Continuous health checks remove unhealthy origins from routing, and the circuit breaker avoids overloading a failing origin.
- Production proxy configuration is protected by guard rails that block boot without TLS, without ACME configured, without a host allowlist, without WAF rules, or with the Admin API enabled without a token.
Proxy production guard rails#
In production, the proxy refuses to start if:
DEV_MODE_NO_TLS=trueACME_STAGING=trueACME_EMAILis emptyALLOWED_HOSTSis emptyUPSTREAM_INSECURE_SKIP_VERIFY=true- Admin API enabled without
ADMIN_TOKEN - Invalid header/body limits
- No WAF rule configured