Added support for HTTPS