From dd97038861e5050f0a1459b3ef8fb87625b9aa31 Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Mon, 3 Aug 2020 19:44:33 -0700 Subject: [PATCH] When constructing a Context from a HeaderMap, fill in the env_config field. --- lambda/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lambda/src/lib.rs b/lambda/src/lib.rs index 24ef4929..1f2c1824 100644 --- a/lambda/src/lib.rs +++ b/lambda/src/lib.rs @@ -204,7 +204,8 @@ where let event = event?; let (parts, body) = event.into_parts(); - let ctx: Context = Context::try_from(parts.headers)?; + let mut ctx: Context = Context::try_from(parts.headers)?; + ctx.env_config = Config::from_env()?; let body = hyper::body::to_bytes(body).await?; let body = serde_json::from_slice(&body)?;