Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

fixed allowed_domains restrcition feature

niranjandasMMa242f30666f5
diff --git a/browser_use/browser/context.py b/browser_use/browser/context.py
index 7d8bd0a60..0be0c1b2c 100644
--- a/browser_use/browser/context.py
+++ b/browser_use/browser/context.py
@@ -614,6 +614,10 @@ class BrowserContext:
parsed_url = urlparse(url)
domain = parsed_url.netloc.lower()
+ # Special case: Allow 'about:blank' explicitly
+ if url == "about:blank":
+ return True
+
# Remove port number if present
if ':' in domain:
domain = domain.split(':')[0]