]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/users.ts
(plugins) adding signup scope and init hook, modifying ensureUserRegistrationAllowed...
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / users.ts
index 8615de4065eb05516f7fc5174dde53aaaa4c47c8..c78c67a8cd7d389e3c50087840891191dbff7e16 100644 (file)
@@ -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(