mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-17 11:17:46 +00:00
dev: add ip to captcha middleware event
This commit is contained in:
1 parent
592acbcae6
commit
d0e06e83c0
1 file changed
+3
@@ -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,
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user