Merge branch 'master' into tempban
This commit is contained in:
commit
4d440c0482
2 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue