Set correct scheme if https module is used.