set default browser locale to none (#4564)

This commit is contained in:
LawyZheng
2026-01-28 16:23:23 +08:00
committed by GitHub
parent 912d8dfa15
commit 87ad865d53
2 changed files with 3 additions and 2 deletions

View File

@@ -126,7 +126,7 @@ class Settings(BaseSettings):
SMTP_PASSWORD: str = "password"
# browser settings
BROWSER_LOCALE: str = "en-US"
BROWSER_LOCALE: str | None = None # "en-US"
BROWSER_TIMEZONE: str = "America/New_York"
BROWSER_WIDTH: int = 1920
BROWSER_HEIGHT: int = 1080

View File

@@ -237,7 +237,6 @@ class BrowserContextFactory:
LOG.info("Extensions added to browser args", extensions=joined_paths)
args = {
"locale": settings.BROWSER_LOCALE,
"color_scheme": "no-preference",
"args": browser_args,
"ignore_default_args": [
@@ -251,6 +250,8 @@ class BrowserContextFactory:
},
"extra_http_headers": extra_http_headers,
}
if settings.BROWSER_LOCALE:
args["locale"] = settings.BROWSER_LOCALE
if settings.ENABLE_PROXY:
proxy_config = setup_proxy()