fix template to support https