Add https support to code