summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorTomofumi Chiba <tomofumi.chiba@gmail.com>2021-06-22 12:21:57 +0900
committerGitHub <noreply@github.com>2021-06-22 05:21:57 +0200
commit4f1b1903cfadeeba24e1b0448879fe12682effb9 (patch)
tree5adf8bd7af8b86052ef555ca7f6ae221515baec0 /runtime
parent580c9f9ef02f8e8226437137867d3edeb9241b5e (diff)
feat(fetch): add programmatic proxy (#10907)
This commit adds new options to unstable "Deno.createHttpClient" API. "proxy" and "basicAuth" options were added that allow to use custom proxy when client instance is passed to "fetch" API.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/build.rs6
-rw-r--r--runtime/web_worker.rs1
-rw-r--r--runtime/worker.rs1
3 files changed, 7 insertions, 1 deletions
diff --git a/runtime/build.rs b/runtime/build.rs
index 84418af4e..7d086b045 100644
--- a/runtime/build.rs
+++ b/runtime/build.rs
@@ -42,7 +42,11 @@ fn create_runtime_snapshot(snapshot_path: &Path, files: Vec<PathBuf>) {
deno_console::init(),
deno_url::init(),
deno_web::init(Default::default(), Default::default()),
- deno_fetch::init::<deno_fetch::NoFetchPermissions>("".to_owned(), None),
+ deno_fetch::init::<deno_fetch::NoFetchPermissions>(
+ "".to_owned(),
+ None,
+ None,
+ ),
deno_websocket::init::<deno_websocket::NoWebSocketPermissions>(
"".to_owned(),
None,
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index 84d8157d6..753238052 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -257,6 +257,7 @@ impl WebWorker {
deno_fetch::init::<Permissions>(
options.user_agent.clone(),
options.ca_data.clone(),
+ None,
),
deno_websocket::init::<Permissions>(
options.user_agent.clone(),
diff --git a/runtime/worker.rs b/runtime/worker.rs
index 7bfb1506b..9dfdcc825 100644
--- a/runtime/worker.rs
+++ b/runtime/worker.rs
@@ -99,6 +99,7 @@ impl MainWorker {
deno_fetch::init::<Permissions>(
options.user_agent.clone(),
options.ca_data.clone(),
+ None,
),
deno_websocket::init::<Permissions>(
options.user_agent.clone(),