mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
feat: Add --unsafely-treat-insecure-origin-as-secure flag to disable SSL verification (#11324)
This commit adds "--unsafely-treat-insecure-origin-as-secure" flag that allows to disable SSL verification for all domains, or specific domains if they were passed as an argument to the flag. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
parent
3ab50b3551
commit
353a4a1af3
22 changed files with 284 additions and 12 deletions
|
@ -50,6 +50,7 @@ pub struct WorkerOptions {
|
|||
pub args: Vec<String>,
|
||||
pub debug_flag: bool,
|
||||
pub unstable: bool,
|
||||
pub unsafely_treat_insecure_origin_as_secure: Option<Vec<String>>,
|
||||
pub root_cert_store: Option<RootCertStore>,
|
||||
pub user_agent: String,
|
||||
pub seed: Option<u64>,
|
||||
|
@ -103,10 +104,12 @@ impl MainWorker {
|
|||
options.root_cert_store.clone(),
|
||||
None,
|
||||
None,
|
||||
options.unsafely_treat_insecure_origin_as_secure.clone(),
|
||||
),
|
||||
deno_websocket::init::<Permissions>(
|
||||
options.user_agent.clone(),
|
||||
options.root_cert_store.clone(),
|
||||
options.unsafely_treat_insecure_origin_as_secure.clone(),
|
||||
),
|
||||
deno_webstorage::init(options.origin_storage_dir.clone()),
|
||||
deno_crypto::init(options.seed),
|
||||
|
@ -131,6 +134,7 @@ impl MainWorker {
|
|||
deno_net::init::<Permissions>(
|
||||
options.root_cert_store.clone(),
|
||||
options.unstable,
|
||||
options.unsafely_treat_insecure_origin_as_secure.clone(),
|
||||
),
|
||||
ops::os::init(),
|
||||
ops::permissions::init(),
|
||||
|
@ -300,6 +304,7 @@ mod tests {
|
|||
args: vec![],
|
||||
debug_flag: false,
|
||||
unstable: false,
|
||||
unsafely_treat_insecure_origin_as_secure: None,
|
||||
root_cert_store: None,
|
||||
seed: None,
|
||||
js_error_create_fn: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue