TsgcWebSocketLoadBalancerServerProperties › SSL

SSL Property

Enables TLS/SSL on the load balancer so that clients can connect using wss:// or https://.

Syntax

property SSL: Boolean read FSSL write FSSL default False;

Default Value

False

Remarks

Set SSL to True to let the load balancer terminate TLS on its public-facing listener so that downstream clients can connect with wss:// or https://. Configure the certificate material in SSLOptions (CertFile, KeyFile, RootCertFile, Password) and set SSLOptions.Port to the TLS port. The same load balancer can serve plain and encrypted endpoints simultaneously by adding several Bindings; the TLS handler is attached only to the secure port. Backend registrations can also arrive over TLS when the backend's LoadBalancer.Host uses the encrypted endpoint. Certificates must be supplied in PEM format.

Example


oServer := TsgcWebSocketLoadBalancerServer.Create(nil);
oServer.SSL := true;
oServer.SSLOptions.CertFile := 'c:\certificates\mycert.pem';
oServer.SSLOptions.KeyFile := 'c:\certificates\mycert.pem';
oServer.SSLOptions.RootCertFile := 'c:\certificates\mycert.pem';
oServer.SSLOptions.Port := 443;
oServer.Port := 443;
oServer.Active := true;

Back to Properties