From 5df35c761b7ebb49c2dc7c755750513b717424c7 Mon Sep 17 00:00:00 2001 From: lihbr Date: Tue, 21 May 2024 20:48:07 +0200 Subject: [PATCH] chore: stop logging honeypot catches --- src/functions/contact/index.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/functions/contact/index.ts b/src/functions/contact/index.ts index c8ce4f5..875fb45 100644 --- a/src/functions/contact/index.ts +++ b/src/functions/contact/index.ts @@ -51,12 +51,11 @@ export const handler: Handler = async (event) => { errors.push("`from` must be a valid email") } if (isBlacklisted(body.from)) { - body.message = "Caught by `blacklist` method" // kthxbye - // return { - // statusCode: 302, - // headers: { location: "/contact/thanks", ...usage.headers }, - // }; + return { + statusCode: 302, + headers: { location: "/contact/thanks", ...usage.headers }, + } } } @@ -82,7 +81,11 @@ export const handler: Handler = async (event) => { } if ("notARobot" in body && body.notARobot === "on") { - body.message = "Caught by `not-a-robot` field method" + // kthxbye + return { + statusCode: 302, + headers: { location: "/contact/thanks", ...usage.headers }, + } } const blocks = [