mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: patch ap .probe() so that it does not execute on requests for its own resources
This commit is contained in:
@@ -511,8 +511,8 @@ ActivityPub.probe = async ({ uid, url }) => {
|
|||||||
|
|
||||||
// Disable on config setting; restrict lookups to HTTPS-enabled URLs only
|
// Disable on config setting; restrict lookups to HTTPS-enabled URLs only
|
||||||
const { activitypubProbe } = meta.config;
|
const { activitypubProbe } = meta.config;
|
||||||
const { protocol } = new URL(url);
|
const { protocol, host } = new URL(url);
|
||||||
if (!activitypubProbe || protocol !== 'https:') {
|
if (!activitypubProbe || protocol !== 'https:' || host === nconf.get('url_parsed').host) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user