Make templates work with SSL