slidedeckai.helpers.llm_helper.is_valid_azure_endpoint_url#

slidedeckai.helpers.llm_helper.is_valid_azure_endpoint_url(azure_endpoint_url: str) bool[source]#

Return whether an Azure endpoint URL is safe enough to receive an API key.

The host allow-list is the security boundary: only HTTPS URLs whose host is azure.com or a .azure.com subdomain are accepted. Loopback, private and metadata hosts such as 127.0.0.1, ::1, localhost and 169.254.169.254 are rejected because they cannot match that suffix.