Adding https support and ssl parameter