diff --git a/server/controllers/assets/utils/getClaimIdAndServeAsset.js b/server/controllers/assets/utils/getClaimIdAndServeAsset.js index 4e4cbafe..37c2cfd4 100644 --- a/server/controllers/assets/utils/getClaimIdAndServeAsset.js +++ b/server/controllers/assets/utils/getClaimIdAndServeAsset.js @@ -37,7 +37,7 @@ const getClaimIdAndServeAsset = (channelName, channelClaimId, claimName, claimId return claim; }) .then(claim => { - if (serveOnlyApproved && !isApprovedChannel({ longId: claim.dataValues.certificateId }, approvedChannels)) { + if (serveOnlyApproved && !isApprovedChannel({ longId: claim.dataValues.publisher_id }, approvedChannels)) { throw new Error(CONTENT_UNAVAILABLE); } logger.debug('Outpoint:', claim.dataValues.outpoint); diff --git a/server/routes/api/index.js b/server/routes/api/index.js index 7b5e9806..5bba49e5 100644 --- a/server/routes/api/index.js +++ b/server/routes/api/index.js @@ -46,6 +46,7 @@ const autoblockPublishMiddleware = (req, res, next) => { let ip = (req.headers['x-forwarded-for'] || req.connection.remoteAddress).split(/,\s?/)[0]; if(blockedAddresses.indexOf(ip) !== -1) { + logger.warn(`Banned IP publish attempt: ${ip}`); res.status(403).send(forbiddenMessage); res.end();