mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: partial revert to fix url_parsed not being available at top of file @barisusakli
This commit is contained in:
@@ -21,8 +21,6 @@ const requestCache = ttl({
|
|||||||
ttl: 1000 * 60 * 5, // 5 minutes
|
ttl: 1000 * 60 * 5, // 5 minutes
|
||||||
});
|
});
|
||||||
|
|
||||||
const urlHostname = nconf.get('url_parsed').hostname;
|
|
||||||
|
|
||||||
const ActivityPub = module.exports;
|
const ActivityPub = module.exports;
|
||||||
|
|
||||||
ActivityPub._constants = Object.freeze({
|
ActivityPub._constants = Object.freeze({
|
||||||
@@ -89,7 +87,7 @@ ActivityPub.resolveInboxes = async (ids) => {
|
|||||||
if (!meta.config.activitypubAllowLoopback) {
|
if (!meta.config.activitypubAllowLoopback) {
|
||||||
ids = ids.filter((id) => {
|
ids = ids.filter((id) => {
|
||||||
const { hostname } = new URL(id);
|
const { hostname } = new URL(id);
|
||||||
return hostname !== urlHostname;
|
return hostname !== nconf.get('url_parsed').hostname;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user