feat: add support for ignoring HTTPS certificate errors (#93)

* feat: add support for ignoring HTTPS certificate errors

* fix: update warning message for already running daemon to include ignore HTTPS errors option

* docs: add documentation for --ignore-https-errors option in README and SKILL.md

* feat: initialize ignore_https_errors flag in command context

* fix: change launch_cmd to mutable for cdp value handling
This commit is contained in:
Zhiwei Li
2026-01-24 23:54:33 -06:00
committed by GitHub
parent 60534dfd63
commit 53187a603c
12 changed files with 65 additions and 2 deletions
+4 -1
View File
@@ -16,6 +16,7 @@ pub struct Flags {
pub args: Option<String>,
pub user_agent: Option<String>,
pub provider: Option<String>,
pub ignore_https_errors: bool,
}
pub fn parse_flags(args: &[String]) -> Flags {
@@ -40,6 +41,7 @@ pub fn parse_flags(args: &[String]) -> Flags {
args: env::var("AGENT_BROWSER_ARGS").ok(),
user_agent: env::var("AGENT_BROWSER_USER_AGENT").ok(),
provider: env::var("AGENT_BROWSER_PROVIDER").ok(),
ignore_https_errors: false,
};
let mut i = 0;
@@ -115,6 +117,7 @@ pub fn parse_flags(args: &[String]) -> Flags {
i += 1;
}
}
"--ignore-https-errors" => flags.ignore_https_errors = true,
_ => {}
}
i += 1;
@@ -127,7 +130,7 @@ pub fn clean_args(args: &[String]) -> Vec<String> {
let mut skip_next = false;
// Global flags that should be stripped from command args
const GLOBAL_FLAGS: &[&str] = &["--json", "--full", "--headed", "--debug"];
const GLOBAL_FLAGS: &[&str] = &["--json", "--full", "--headed", "--debug", "--ignore-https-errors"];
// Global flags that take a value (need to skip the next arg too)
const GLOBAL_FLAGS_WITH_VALUE: &[&str] = &[
"--session",