This should use the 'http vs https' setting from the admin UI to make sure that this works on the production environment.