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
|
||||
const { activitypubProbe } = meta.config;
|
||||
const { protocol } = new URL(url);
|
||||
if (!activitypubProbe || protocol !== 'https:') {
|
||||
const { protocol, host } = new URL(url);
|
||||
if (!activitypubProbe || protocol !== 'https:' || host === nconf.get('url_parsed').host) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user