@@ -101,7 +101,7 @@ namespace Api.Controllers
|
|||||||
return ValidationProblem(ModelState);
|
return ValidationProblem(ModelState);
|
||||||
|
|
||||||
var userIp = HttpContext.Connection.RemoteIpAddress?.ToString();
|
var userIp = HttpContext.Connection.RemoteIpAddress?.ToString();
|
||||||
var verdict = await _captcha.VerifyAsync(req.CaptchaToken, userIp, "contact", ct);
|
var verdict = await _captcha.VerifyAsync(req.CaptchaToken, userIp, "subscribe", ct);
|
||||||
if (!verdict.Success)
|
if (!verdict.Success)
|
||||||
{
|
{
|
||||||
return BadRequest(new ErrorResponse { Error = "Captcha verification failed.", Code = "captcha_verification_failed" });
|
return BadRequest(new ErrorResponse { Error = "Captcha verification failed.", Code = "captcha_verification_failed" });
|
||||||
|
|||||||
@@ -657,7 +657,7 @@
|
|||||||
|
|
||||||
if (window.grecaptcha && reCaptchaSiteKey) {
|
if (window.grecaptcha && reCaptchaSiteKey) {
|
||||||
grecaptcha.ready(function () {
|
grecaptcha.ready(function () {
|
||||||
grecaptcha.execute(reCaptchaSiteKey, { action: 'contact' }).then(postSubscribe);
|
grecaptcha.execute(reCaptchaSiteKey, { action: 'subscribe' }).then(postSubscribe);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$loader.hide();
|
$loader.hide();
|
||||||
|
|||||||
Reference in New Issue
Block a user