Skip to content

Commit

Permalink
Tweak spam filter
Browse files Browse the repository at this point in the history
  • Loading branch information
futurGH committed Mar 28, 2024
1 parent ebbfd67 commit 3574d2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/api/contact.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export async function api(request: HydrogenRequest) {
});
if (!recaptchaResponse.ok) potentiallySpam = true;
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const { success, score = 0 } = await recaptchaResponse.json();
const { success, score = 1 } = await recaptchaResponse.json();
if (!success) potentiallySpam = true;
if (score < 0.2) potentiallySpam = true;
if (score <= 0.1 || message.includes("http")) potentiallySpam = true;
} else {
potentiallySpam = true;
}
Expand Down

0 comments on commit 3574d2c

Please sign in to comment.