def is_request_allowed(url):
    """
    Check if a request to a given URL is allowed based on the root domain.

    Args:
        url (str): The URL to check.

    Returns:
        bool: True if the request is allowed, False otherwise.

    """
    root_domain = get_root_domain(url)
    return root_domain in allowed_domains

    Check if a request to a given URL is allowed based on the root domain.

    Args:
        url (str): The URL to check.

    Returns:
        bool: True if the request is allowed, False otherwise.

    
llama-index-packs/llama-index-packs-secgpt/llama_index/packs/secgpt/sandbox.py