Our solution
TLS in YAML, HTTP/2 for free
Enable TLS with a cert and key file path. HTTP/2 follows automatically. Add a client_auth block for mTLS. No code changes, no middleware.
From plaintext to encrypted in six steps
Add the tls.server block to router YAML with cert_file and key_file paths pointing to PEM-format files.
The router starts an HTTPS listener. All client connections are encrypted.
HTTP/2 is automatically available when TLS is enabled. Clients supporting HTTP/2 are upgraded automatically.
For subgraph connections, use HTTPS URLs in the subgraph configuration. The router connects over TLS automatically.
For mTLS, add client_auth.cert_file with the CA certificate for validating client certificates.
Set client_auth.required: true to enforce that every client must present a valid certificate. Connections without valid certificates are refused.
Available since Router 0.71.0.

