summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/HttpRequestService.ts
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-03-25 17:19:38 -0400
committerHazelnoot <acomputerdog@gmail.com>2025-03-25 17:19:38 -0400
commit7ea710b31442cd05ac75a971212a0fa09f69645a (patch)
tree329be633fd9678782fe8756c281dcabd8d7cdeef /packages/backend/src/core/HttpRequestService.ts
parentadd utility methods to get instance actor, relay actor, and proxy actor (diff)
downloadsharkey-7ea710b31442cd05ac75a971212a0fa09f69645a.tar.gz
sharkey-7ea710b31442cd05ac75a971212a0fa09f69645a.tar.bz2
sharkey-7ea710b31442cd05ac75a971212a0fa09f69645a.zip
remerge: remove FetchAllowSoftFailMask in favor of our same-authority checks
Diffstat (limited to 'packages/backend/src/core/HttpRequestService.ts')
-rw-r--r--packages/backend/src/core/HttpRequestService.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/backend/src/core/HttpRequestService.ts b/packages/backend/src/core/HttpRequestService.ts
index e8b0326e66..12047346fb 100644
--- a/packages/backend/src/core/HttpRequestService.ts
+++ b/packages/backend/src/core/HttpRequestService.ts
@@ -16,7 +16,6 @@ import type { Config } from '@/config.js';
import { StatusError } from '@/misc/status-error.js';
import { bindThis } from '@/decorators.js';
import { validateContentTypeSetAsActivityPub } from '@/core/activitypub/misc/validator.js';
-import { FetchAllowSoftFailMask } from '@/core/activitypub/misc/check-against-url.js';
import type { IObject, IObjectWithId } from '@/core/activitypub/type.js';
import { ApUtilityService } from './activitypub/ApUtilityService.js';
import type { Response } from 'node-fetch';
@@ -250,7 +249,7 @@ export class HttpRequestService {
}
@bindThis
- public async getActivityJson(url: string, isLocalAddressAllowed = false, allowSoftfail: FetchAllowSoftFailMask = FetchAllowSoftFailMask.Strict): Promise<IObjectWithId> {
+ public async getActivityJson(url: string, isLocalAddressAllowed = false): Promise<IObjectWithId> {
const res = await this.send(url, {
method: 'GET',
headers: {
@@ -268,7 +267,7 @@ export class HttpRequestService {
// Make sure the object ID matches the final URL (which is where it actually exists).
// The caller (ApResolverService) will verify the ID against the original / entry URL, which ensures that all three match.
- this.apUtilityService.assertIdMatchesUrlAuthority(activity, res.url, allowSoftfail);
+ this.apUtilityService.assertIdMatchesUrlAuthority(activity, res.url);
return activity as IObjectWithId;
}