prepare for https support