Skip to content

Commit dd97038

Browse files
committed
When constructing a Context from a HeaderMap, fill in the env_config field.
1 parent c36409c commit dd97038

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lambda/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ where
204204
let event = event?;
205205
let (parts, body) = event.into_parts();
206206

207-
let ctx: Context = Context::try_from(parts.headers)?;
207+
let mut ctx: Context = Context::try_from(parts.headers)?;
208+
ctx.env_config = Config::from_env()?;
208209
let body = hyper::body::to_bytes(body).await?;
209210
let body = serde_json::from_slice(&body)?;
210211

0 commit comments

Comments
 (0)