Update packages/backend/src/core/activitypub/ApRequestService.ts
cherry picked from commit 129af06198
Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
This commit is contained in:
parent
edf94b5452
commit
b3d4f18175
1 changed files with 3 additions and 1 deletions
|
@ -202,7 +202,9 @@ export class ApRequestService {
|
|||
});
|
||||
|
||||
//#region リクエスト先がhtmlかつactivity+jsonへのalternate linkタグがあるとき
|
||||
if (res.headers.get('Content-type')?.startsWith('text/html;') && _followAlternate) {
|
||||
const contentType = res.headers.get('content-type');
|
||||
|
||||
if ((contentType === 'text/html' || contentType?.startsWith('text/html;')) && _followAlternate) {
|
||||
const html = await res.text();
|
||||
const fragment = JSDOM.fragment(html);
|
||||
|
||||
|
|
Loading…
Reference in a new issue