[wip] Add https support (needs tests) [applied]