From 9689cd04706f480a1c77350cdf0368fd45a55dc5 Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Wed, 19 Nov 2025 20:38:29 +0000 Subject: [PATCH] PYTHON-5647 extend `ALLOWED_HOSTS` --- pymongo/auth_shared.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pymongo/auth_shared.py b/pymongo/auth_shared.py index 5a9a2b6732..605dbf2611 100644 --- a/pymongo/auth_shared.py +++ b/pymongo/auth_shared.py @@ -159,6 +159,8 @@ def _build_credentials_tuple( "localhost", "127.0.0.1", "::1", + "*.mongo.com", + "*.mongodbgov.net", ] allowed_hosts = properties.get("ALLOWED_HOSTS", default_allowed) if properties.get("ALLOWED_HOSTS", None) is not None and human_callback is None: