diff options
author | Sahand Akbarzadeh <sahandevs@gmail.com> | 2024-11-15 14:14:11 +0330 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-15 11:44:11 +0100 |
commit | 032ae7fb19bd01c1de28515facd5c3b2ce821924 (patch) | |
tree | 36a95c499cbc8cbb516716d52729d96e5b781a13 /runtime/worker.rs | |
parent | c9baf3849fdbe161a9251a712a71e2b91eeabf3e (diff) |
feat(ext/fetch): allow embedders to use `hickory_dns_resolver` instead of default `GaiResolver` (#26740)
Allows embedders to use `hickory-dns-resolver` instead of threaded "getaddrinfo" resolver
in the `fetch()` implementation.
Diffstat (limited to 'runtime/worker.rs')
-rw-r--r-- | runtime/worker.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/worker.rs b/runtime/worker.rs index c7bfb1c5f..99123463c 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -143,6 +143,7 @@ pub struct WorkerServiceOptions { pub npm_process_state_provider: Option<NpmProcessStateProviderRc>, pub permissions: PermissionsContainer, pub root_cert_store_provider: Option<Arc<dyn RootCertStoreProvider>>, + pub fetch_dns_resolver: deno_fetch::dns::Resolver, /// The store to use for transferring SharedArrayBuffers between isolates. /// If multiple isolates should have the possibility of sharing @@ -363,6 +364,7 @@ impl MainWorker { .unsafely_ignore_certificate_errors .clone(), file_fetch_handler: Rc::new(deno_fetch::FsFetchHandler), + resolver: services.fetch_dns_resolver, ..Default::default() }, ), |