Add TLS support for REST API