We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9855c5c commit 420f398Copy full SHA for 420f398
src/api/lambda.ts
@@ -14,12 +14,10 @@ const handler = async (
14
event: APIGatewayEvent | WarmerEvent,
15
context: Context,
16
) => {
17
- if ("action" in event) {
18
- console.log(`Got warmer event for instance ID ${instanceId}.`);
19
- return {
20
- instanceId,
21
- };
+ if ("action" in event && event.action === "warmer") {
+ return { instanceId };
22
}
+ event = event as APIGatewayEvent;
23
if (process.env.ORIGIN_VERIFY_KEY) {
24
// check that the request has the right header (coming from cloudfront)
25
if (
0 commit comments