feat: provide support for BROWSER_ADDITIONAL_ARGS (#4637)
Co-authored-by: Suchintan <suchintan@users.noreply.github.com>
This commit is contained in:
@@ -133,6 +133,7 @@ class Settings(BaseSettings):
|
|||||||
BROWSER_POLICY_FILE: str = "/etc/chromium/policies/managed/policies.json"
|
BROWSER_POLICY_FILE: str = "/etc/chromium/policies/managed/policies.json"
|
||||||
BROWSER_LOGS_ENABLED: bool = True
|
BROWSER_LOGS_ENABLED: bool = True
|
||||||
BROWSER_MAX_PAGES_NUMBER: int = 10
|
BROWSER_MAX_PAGES_NUMBER: int = 10
|
||||||
|
BROWSER_ADDITIONAL_ARGS: list[str] = []
|
||||||
|
|
||||||
# Add extension folders name here to load extension in your browser
|
# Add extension folders name here to load extension in your browser
|
||||||
EXTENSIONS_BASE_PATH: str = "./extensions"
|
EXTENSIONS_BASE_PATH: str = "./extensions"
|
||||||
|
|||||||
@@ -236,6 +236,7 @@ class BrowserContextFactory:
|
|||||||
browser_args.extend([f"--disable-extensions-except={joined_paths}", f"--load-extension={joined_paths}"])
|
browser_args.extend([f"--disable-extensions-except={joined_paths}", f"--load-extension={joined_paths}"])
|
||||||
LOG.info("Extensions added to browser args", extensions=joined_paths)
|
LOG.info("Extensions added to browser args", extensions=joined_paths)
|
||||||
|
|
||||||
|
browser_args.extend(settings.BROWSER_ADDITIONAL_ARGS)
|
||||||
args = {
|
args = {
|
||||||
"color_scheme": "no-preference",
|
"color_scheme": "no-preference",
|
||||||
"args": browser_args,
|
"args": browser_args,
|
||||||
|
|||||||
Reference in New Issue
Block a user