fix up https and headers