feat: provide support for BROWSER_ADDITIONAL_ARGS (#4637)

Co-authored-by: Suchintan <suchintan@users.noreply.github.com>
This commit is contained in:
Davide Cavestro
2026-02-08 06:22:54 +01:00
committed by GitHub
parent 4f1bf25768
commit d9707e0759
2 changed files with 2 additions and 0 deletions

View File

@@ -133,6 +133,7 @@ class Settings(BaseSettings):
BROWSER_POLICY_FILE: str = "/etc/chromium/policies/managed/policies.json"
BROWSER_LOGS_ENABLED: bool = True
BROWSER_MAX_PAGES_NUMBER: int = 10
BROWSER_ADDITIONAL_ARGS: list[str] = []
# Add extension folders name here to load extension in your browser
EXTENSIONS_BASE_PATH: str = "./extensions"

View File

@@ -236,6 +236,7 @@ class BrowserContextFactory:
browser_args.extend([f"--disable-extensions-except={joined_paths}", f"--load-extension={joined_paths}"])
LOG.info("Extensions added to browser args", extensions=joined_paths)
browser_args.extend(settings.BROWSER_ADDITIONAL_ARGS)
args = {
"color_scheme": "no-preference",
"args": browser_args,