diff --git a/ipinfo/handler_utils.py b/ipinfo/handler_utils.py index 72f9b14..d81a126 100644 --- a/ipinfo/handler_utils.py +++ b/ipinfo/handler_utils.py @@ -9,7 +9,7 @@ from .version import SDK_VERSION # Base URL to make requests against. -API_URL = "https://ipinfo.io" +API_URL = os.environ.get("IPINFO_API_URL", "https://ipinfo.io") # Used to transform incoming responses with country abbreviations into the full # expanded country name, e.g. "PK" -> "Pakistan".