Skip to content

Commit 96ef89b

Browse files
committed
Update security_watchdog.py
1 parent c807f4d commit 96ef89b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

browser_use/browser/watchdogs/security_watchdog.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ def _is_url_allowed(self, url: str) -> bool:
128128
True if the URL is allowed, False otherwise
129129
"""
130130

131+
# If no allowed_domains specified, allow all URLs
132+
if (
133+
not self.browser_session.browser_profile.allowed_domains
134+
and not self.browser_session.browser_profile.prohibited_domains
135+
):
136+
return True
137+
131138
# Always allow internal browser targets
132139
if url in ['about:blank', 'chrome://new-tab-page/', 'chrome://new-tab-page', 'chrome://newtab/']:
133140
return True

0 commit comments

Comments
 (0)