diff options
author | TheAifam5 <theaifam5@gmail.com> | 2021-08-09 16:53:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-09 16:53:21 +0200 |
commit | 353a4a1af3165b2c59319865350d70a99105269c (patch) | |
tree | 32eb71ccef95552bd4ec4af176b7ddcfe51d172c /cli/file_fetcher.rs | |
parent | 3ab50b355141f744a0acec1a5cc3b3b95247d4b1 (diff) |
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>
Diffstat (limited to 'cli/file_fetcher.rs')
-rw-r--r-- | cli/file_fetcher.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/file_fetcher.rs b/cli/file_fetcher.rs index 207f08c64..e61c3beb9 100644 --- a/cli/file_fetcher.rs +++ b/cli/file_fetcher.rs @@ -223,6 +223,7 @@ impl FileFetcher { allow_remote: bool, root_cert_store: Option<RootCertStore>, blob_store: BlobStore, + unsafely_treat_insecure_origin_as_secure: Option<Vec<String>>, ) -> Result<Self, AnyError> { Ok(Self { auth_tokens: AuthTokens::new(env::var(DENO_AUTH_TOKENS).ok()), @@ -235,6 +236,7 @@ impl FileFetcher { root_cert_store, None, None, + unsafely_treat_insecure_origin_as_secure, )?, blob_store, }) @@ -618,6 +620,7 @@ mod tests { true, None, blob_store.clone(), + None, ) .expect("setup failed"); (file_fetcher, temp_dir, blob_store) @@ -1063,6 +1066,7 @@ mod tests { true, None, BlobStore::default(), + None, ) .expect("setup failed"); let result = file_fetcher @@ -1090,6 +1094,7 @@ mod tests { true, None, BlobStore::default(), + None, ) .expect("could not create file fetcher"); let specifier = @@ -1118,6 +1123,7 @@ mod tests { true, None, BlobStore::default(), + None, ) .expect("could not create file fetcher"); let result = file_fetcher_02 @@ -1279,6 +1285,7 @@ mod tests { true, None, BlobStore::default(), + None, ) .expect("could not create file fetcher"); let specifier = @@ -1310,6 +1317,7 @@ mod tests { true, None, BlobStore::default(), + None, ) .expect("could not create file fetcher"); let result = file_fetcher_02 @@ -1420,6 +1428,7 @@ mod tests { false, None, BlobStore::default(), + None, ) .expect("could not create file fetcher"); let specifier = @@ -1447,6 +1456,7 @@ mod tests { true, None, BlobStore::default(), + None, ) .expect("could not create file fetcher"); let file_fetcher_02 = FileFetcher::new( @@ -1455,6 +1465,7 @@ mod tests { true, None, BlobStore::default(), + None, ) .expect("could not create file fetcher"); let specifier = |