hono-adapter-aws-lambda 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +3 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -303,6 +303,7 @@ function getProcessor(event) {
|
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
function minimalEvent(method, path, baseEvent) {
|
|
306
|
+
var _a;
|
|
306
307
|
const event = baseEvent ?? {};
|
|
307
308
|
event.requestContext ?? (event.requestContext = {
|
|
308
309
|
http: {
|
|
@@ -311,6 +312,8 @@ function minimalEvent(method, path, baseEvent) {
|
|
|
311
312
|
},
|
|
312
313
|
routeKey: ""
|
|
313
314
|
});
|
|
315
|
+
event.headers ?? (event.headers = {});
|
|
316
|
+
(_a = event.headers)["content-type"] ?? (_a["content-type"] = "application/json");
|
|
314
317
|
event.routeKey = event.requestContext.routeKey = `${method} ${path}`;
|
|
315
318
|
event.requestContext.http.method = method;
|
|
316
319
|
event.rawPath = event.requestContext.http.path = path;
|