Skip to main content

serve_tls

Function serve_tls 

Source
pub async fn serve_tls(
    router: Router,
    addr: SocketAddr,
    cert_pem: impl AsRef<Path>,
    key_pem: impl AsRef<Path>,
) -> Result<()>
Expand description

Serves router over HTTPS using a certificate/key pair loaded from disk (PEM format). This is real TLS termination — use it when there’s no reverse proxy in front of the service.