From c4bd6dfb6bf97bfa5195cac2e60c81585174f30d Mon Sep 17 00:00:00 2001 From: Julia Johannesen Date: Sun, 22 Sep 2024 18:35:29 -0400 Subject: [PATCH] Use `res.ok` instead of 200-299 (cherry picked from commit b667a68bd4eb916084658592d2942d521950005b) --- packages/backend/src/core/activitypub/ApRequestService.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/backend/src/core/activitypub/ApRequestService.ts b/packages/backend/src/core/activitypub/ApRequestService.ts index 839dfbee33..129334cb5f 100644 --- a/packages/backend/src/core/activitypub/ApRequestService.ts +++ b/packages/backend/src/core/activitypub/ApRequestService.ts @@ -206,8 +206,7 @@ export class ApRequestService { const contentType = res.headers.get('content-type'); if ( - res.status >= 200 - && res.status <= 299 + res.ok && (contentType ?? '').split(';')[0].trimEnd().toLowerCase() === 'text/html' && _followAlternate === true ) {