dev: add ip to captcha middleware event

This commit is contained in:
KernelDeimos
2025-04-08 16:54:36 -04:00
parent 592acbcae6
commit d0e06e83c0
@@ -37,9 +37,12 @@ const checkCaptcha = ({ svc_captcha }) => async (req, res, next) => {
req.captchaRequired = false;
return next();
}
const ip = req.headers?.['x-forwarded-for'] ||
req.connection?.remoteAddress;
const svc_event = services.get('event');
const event = {
ip,
// By default, captcha always appears if enabled
required: true,
};