tls property
Serve HTTPS on the port, with no proxy: the certificate chain and its
private key, as PEM files. The port then speaks only TLS (1.2 and
1.3). A plain HTTP client gets no answer. With http2 on, the client
picks HTTP/2 or HTTP/1.1 in the handshake (ALPN). req.scheme() is
https, so cookies get Secure. A bad file throws a TlsException
when the server starts. Dox().server.reloadCertificate() reads the
files again, with no restart. For HTTPS on one port and plain HTTP
on another, see ports. Built-in servers only: with your own server
in startServer(server:) it stops the start. Default null: plain
HTTP.
tls: TlsOptions(
certificatePath: '/etc/letsencrypt/live/example.com/fullchain.pem',
keyPath: '/etc/letsencrypt/live/example.com/privkey.pem',
),
Implementation
final TlsOptions? tls;