Skip to content

Commit

Permalink
chore: stop logging honeypot catches
Browse files Browse the repository at this point in the history
  • Loading branch information
lihbr committed May 21, 2024
1 parent 5ee5706 commit 5df35c7
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/functions/contact/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
}
}
}

Expand All @@ -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 = [
Expand Down

0 comments on commit 5df35c7

Please sign in to comment.