Update packages/backend/src/core/activitypub/ApRequestService.ts

This commit is contained in:
かっこかり 2024-08-17 18:25:46 +09:00 committed by GitHub
parent 83c04c55ad
commit 129af06198
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;