more correct handling of $horizon_use_ssl