diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2024-08-17 18:25:46 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-17 18:25:46 +0900 |
| commit | 129af061989f535ab4c79f497ba55cc5f6bf0385 (patch) | |
| tree | d5dca85075ac31e705eaf9f041e983c2a2f5c490 /packages | |
| parent | fix(misskey-js): eliminate any (follow-up of #13523) (#14422) (diff) | |
| download | misskey-129af061989f535ab4c79f497ba55cc5f6bf0385.tar.gz misskey-129af061989f535ab4c79f497ba55cc5f6bf0385.tar.bz2 misskey-129af061989f535ab4c79f497ba55cc5f6bf0385.zip | |
Update packages/backend/src/core/activitypub/ApRequestService.ts
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/backend/src/core/activitypub/ApRequestService.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/backend/src/core/activitypub/ApRequestService.ts b/packages/backend/src/core/activitypub/ApRequestService.ts index 69b09ba808..3d1bd44648 100644 --- a/packages/backend/src/core/activitypub/ApRequestService.ts +++ b/packages/backend/src/core/activitypub/ApRequestService.ts @@ -203,7 +203,9 @@ export class ApRequestService { }); //#region リクエスト先がhtmlかつactivity+jsonへのalternate linkタグがあるとき - if (res.headers.get('Content-type')?.startsWith('text/html;') && _followAlternate === true) { + const contentType = res.headers.get('content-type'); + + if ((contentType === 'text/html' || contentType?.startsWith('text/html;')) && _followAlternate === true) { const html = await res.text(); const window = new Window(); const document = window.document; |