Skip to content

Commit

Permalink
add support to hCaptcha
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoDornelles authored Aug 21, 2021
1 parent a76efdc commit 6fa8352
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ api.use(express.urlencoded({ extended: false }));

api.post('/', async (request, response) => {
const remoteAddress = request.connection.remoteAddress;
const recaptcha = request.body["g-recaptcha-response"] ?? null;
const recaptcha = request.body["g-recaptcha-response"] ?? request.body["h-captcha-response"] ?? null;
const comment = request.body["comment"] ?? null;
const email = request.body["email"] ?? null;
const name = request.body["name"] ?? null;
Expand Down Expand Up @@ -76,4 +76,4 @@ api.post('/', async (request, response) => {
.catch(error => {
return response.json({ok: false, message: error.message ?? error});
});
});
});

0 comments on commit 6fa8352

Please sign in to comment.