Remove signToActivityPubGet option #83

Merged
Johann150 merged 2 commits from feat/signToActivityPubGet into main 2022-08-21 19:11:48 +00:00
3 changed files with 2 additions and 9 deletions

View file

@ -120,9 +120,6 @@ redis:
# Proxy remote files (default: false)
#proxyRemoteFiles: true
# Sign to ActivityPub GET request (default: false)
#signToActivityPubGet: true
#allowedPrivateNetworks: [
# '127.0.0.1/32'
#]

View file

@ -63,8 +63,6 @@ export type Source = {
mediaProxy?: string;
proxyRemoteFiles?: boolean;
signToActivityPubGet?: boolean;
};
/**

View file

@ -72,13 +72,11 @@ export default class Resolver {
throw new Error('Instance is blocked');
}
if (config.signToActivityPubGet && !this.user) {
if (!this.user) {
this.user = await getInstanceActor();
}
const object = (this.user
? await signedGet(value, this.user)
: await getJson(value, 'application/activity+json, application/ld+json')) as IObject;
const object = await signedGet(value, this.user);
if (object == null || (
Array.isArray(object['@context']) ?