Skip to content

Commit

Permalink
Fix bug where otel brings down the lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
dbartholomae committed Jan 4, 2023
1 parent a292960 commit baa95be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ensureAnalyticsEventInput } from "./model/AnalyticsEventInput";
import { saveEvent } from "./handler/saveEvent";
import { cors } from "@lambda-middleware/cors";

export const handler: APIGatewayProxyHandler = cors({
const handler: APIGatewayProxyHandler = cors({
allowedOrigins: [
"http://localhost:3000",
"http://localhost:6006",
Expand All @@ -29,3 +29,5 @@ export const handler: APIGatewayProxyHandler = cors({
body: "",
};
});

module.exports = { handler };
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { aggregateEvents } from "./handler/aggregateEvents";
import { APIGatewayProxyHandler } from "aws-lambda";
import { cors } from "@lambda-middleware/cors";

export const handler: APIGatewayProxyHandler = cors({
const handler: APIGatewayProxyHandler = cors({
allowedOrigins: [
"http://localhost:3000",
"http://localhost:6006",
Expand All @@ -17,3 +17,5 @@ export const handler: APIGatewayProxyHandler = cors({
body: JSON.stringify(aggregateEvents(events), null, 2),
};
});

module.exports = { handler };

0 comments on commit baa95be

Please sign in to comment.