You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/fierycod/holy_lambda_ring_adapter/core.cljc
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,12 @@
33
33
[{:keys [event ctx]}]
34
34
(let [request-ctx (get event :requestContext)
35
35
http (get request-ctx :http)
36
-
headers (get event :headers)
36
+
headers (persistent! (reduce (fn [acc [k v]]
37
+
(if (keyword? k)
38
+
(assoc! acc (.toLowerCase (name k)) v)
39
+
(assoc! acc k v)))
40
+
(transient {})
41
+
(get event :headers)))
37
42
base64? (get event :isBase64Encoded)]
38
43
(when-not request-ctx
39
44
(throw (ex-info"Incorrect shape of AWS event. The adapter is compatible with following integrations: HttpApi and RestApi on AWS Api Gateway service. If you're testing locally make sure the event shape is valid e.g. use `sam local start-api` instead of `sam local invoke`." {:ctx:hl-ring-adapter})))
0 commit comments