Implementing https support