Update autoblockPublishMiddleware.js #732

Merged
skhameneh merged 2 commits from fix-ban-path into master 2018-11-12 21:21:18 +01:00
Showing only changes of commit 079c9ef784 - Show all commits

View file

@ -58,7 +58,7 @@ const autoblockPublishBodyMiddleware = (req, res, next) => {
let ip = (req.headers['x-forwarded-for'] || req.connection.remoteAddress).split(/,\s?/)[0]; let ip = (req.headers['x-forwarded-for'] || req.connection.remoteAddress).split(/,\s?/)[0];
const { channelName } = req.body; const { channelName } = req.body;
if (channelName && publishingChannelWhitelist.indexOf(channelName) !== -1) { if (channelName && publishingChannelWhitelist.indexOf(channelName.toLowerCase()) !== -1) {
delete ipCounts[ip]; delete ipCounts[ip];
} }
} }