Skip to content

Commit

Permalink
Update packages/backend/src/core/activitypub/ApRequestService.ts
Browse files Browse the repository at this point in the history
cherry picked from commit 129af06

Co-authored-by: かっこかり <[email protected]>
  • Loading branch information
kakkokari-gtyih authored and u1-liquid committed Dec 24, 2024
1 parent edf94b5 commit b3d4f18
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/backend/src/core/activitypub/ApRequestService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit b3d4f18

Please sign in to comment.