From 8ecbb5cc5c0731438d966fb9e67dd75eff2a5cfd Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 5 Jul 2024 12:14:16 -0400 Subject: [PATCH] fix: partial revert to fix url_parsed not being available at top of file @barisusakli --- src/activitypub/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/activitypub/index.js b/src/activitypub/index.js index 64b5f47dd9..5cfb5cf308 100644 --- a/src/activitypub/index.js +++ b/src/activitypub/index.js @@ -21,8 +21,6 @@ const requestCache = ttl({ ttl: 1000 * 60 * 5, // 5 minutes }); -const urlHostname = nconf.get('url_parsed').hostname; - const ActivityPub = module.exports; ActivityPub._constants = Object.freeze({ @@ -89,7 +87,7 @@ ActivityPub.resolveInboxes = async (ids) => { if (!meta.config.activitypubAllowLoopback) { ids = ids.filter((id) => { const { hostname } = new URL(id); - return hostname !== urlHostname; + return hostname !== nconf.get('url_parsed').hostname; }); }