Revert "feat: add domain blocklist check in activitypub middleware"

This was already done later in the file.

This reverts commit 8e5e208607.
This commit is contained in:
Julian Lam
2026-04-16 14:58:15 -04:00
parent 8e5e208607
commit 3bf398e797

View File

@@ -76,14 +76,6 @@ middleware.assertPayload = helpers.try(async function (req, res, next) {
return res.sendStatus(403);
}
// Domain check against blocklists
const { hostname } = new URL(req.body.actor);
const isAllowed = await activitypub.blocklists.check(hostname);
if (!isAllowed) {
activitypub.helpers.log(`[middleware/activitypub] Blocked incoming activity from ${hostname} due to blocklist.`);
return res.sendStatus(403);
}
// Sanity-check payload schema
const required = ['id', 'type', 'actor', 'object'];
if (!required.every(prop => req.body.hasOwnProperty(prop))) {