Update autoblockPublishMiddleware.js

This commit is contained in:
Shawn K 2018-11-12 14:21:07 -06:00 committed by GitHub
parent 887a86e927
commit 079c9ef784
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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