From ba7b7e572f0634e534320a057f4cc0a95f2a541d Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Mon, 25 Nov 2019 11:16:12 +0100 Subject: (plugins) adding signup scope and init hook, modifying ensureUserRegistrationAllowed allowedParams --- server/middlewares/validators/users.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/middlewares/validators') diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index 8615de406..c78c67a8c 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts @@ -283,7 +283,8 @@ const usersVideoRatingValidator = [ const ensureUserRegistrationAllowed = [ async (req: express.Request, res: express.Response, next: express.NextFunction) => { const allowedParams = { - body: req.body + body: req.body, + ip: req.ip } const allowedResult = await Hooks.wrapPromiseFun( -- cgit v1.2.3