Minor cleanup
This commit is contained in:
parent
a1ab73bd77
commit
c92cd75f88
1 changed files with 0 additions and 4 deletions
|
@ -54,15 +54,11 @@ const autoblockPublishMiddleware = (req, res, next) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const autoblockPublishBodyMiddleware = (req, res, next) => {
|
const autoblockPublishBodyMiddleware = (req, res, next) => {
|
||||||
console.log('REQUEST BODY', req.body)
|
|
||||||
if(req.body && publishingChannelWhitelist) {
|
if(req.body && publishingChannelWhitelist) {
|
||||||
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;
|
||||||
|
|
||||||
console.log(channelName, publishingChannelWhitelist.indexOf(channelName) !== -1)
|
|
||||||
if(channelName && publishingChannelWhitelist.indexOf(channelName) !== -1) {
|
if(channelName && publishingChannelWhitelist.indexOf(channelName) !== -1) {
|
||||||
console.log('whitelisted channelName')
|
|
||||||
delete ipCounts[ip];
|
delete ipCounts[ip];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue