Skip to content

Commit 6dab21b

Browse files
committed
Set timeout for fetching SHC issuer JWKS.
1 parent fe40e7b commit 6dab21b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/decoder/shc.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use std::{
44
io::Read,
55
path::{Path, PathBuf},
66
sync::Arc,
7+
time::Duration,
78
};
89

910
use async_trait::async_trait;
@@ -217,7 +218,9 @@ impl ShcDecoder {
217218
const MAX_AGE_SECS: u64 = 60 * 60 * 24 * 7;
218219

219220
pub async fn new(config: ShcConfig) -> eyre::Result<Self> {
220-
let client = reqwest::Client::default();
221+
let client = reqwest::Client::builder()
222+
.timeout(Duration::from_secs(10))
223+
.build()?;
221224

222225
let cache_dir = config
223226
.cache_dir

0 commit comments

Comments
 (0)