import copy


def clean_manifest(manifest_json):
    """ cleans up possible errors in the user manifest.

    Args:
        manifest_json (dict): dict representation of user manifest.

    Returns:
        dict: The user manifest with its possible errors fixed.
    """
    manifest_json = copy.deepcopy(manifest_json)
    host = manifest_json["host"]
    host = host.strip("/").lstrip("http://").lstrip("https://")
    manifest_json["host"] = host
    return manifest_json