fix: partial revert to fix url_parsed not being available at top of file @barisusakli

This commit is contained in:
Julian Lam
2024-07-05 12:14:16 -04:00
parent 46341673b3
commit 8ecbb5cc5c

View File

@@ -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;
});
}