fix: Add DNS resolver to oidc crate as well

Because openidconnect vendors reqwest (??), we have to re-implement
the entire Resolve trait.

No I don't like it, but I can't think of a better solution.
This commit is contained in:
theS1LV3R authored and Ellis Git committed 2026-11-08 19:40:49 +00:00
1 parent 60a0784a36
commit 144777dab0
3 files changed
+30 -8

No files matched your search

+2 -1
View File
@@ -32,7 +32,7 @@ use tokio::{runtime, sync::SetOnce};
use url::Url;
use crate::{
Dep, config, globals, media,
Dep, client, config, globals, media,
oauth::grant::AuthorizationCodeResponse,
threepid,
users::{self, AccountStatus, ProfileFieldChange},
@@ -163,6 +163,7 @@ impl crate::Service for Service {
machine: SetOnce::new(),
// This isn't in the client service because it has to use the `reqwest` shipped by `openidconnect`
client: reqwest::ClientBuilder::new()
.dns_resolver(args.depend::<client::Service>("client").reqwest_resolver.clone())
.connect_timeout(Duration::from_secs(args.server.config.request_conn_timeout))
.read_timeout(Duration::from_secs(args.server.config.request_timeout))
.timeout(Duration::from_secs(args.server.config.request_total_timeout))