Skip to content

Commit eec2f21

Browse files
tai-chaLemonDouble
authored andcommitted
Fix(beckend): html content-type detection on signedGet (misskey-dev#14424)
* fix(backend): contenttype detection of html in signedGet * code style * fix by review
1 parent a3bc849 commit eec2f21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ export class ApRequestService {
204204

205205
//#region リクエスト先がhtmlかつactivity+jsonへのalternate linkタグがあるとき
206206
const contentType = res.headers.get('content-type');
207-
208-
if ((contentType === 'text/html' || contentType?.startsWith('text/html;')) && _followAlternate === true) {
207+
208+
if ((contentType ?? '').split(';')[0].trimEnd().toLowerCase() === 'text/html' && _followAlternate === true) {
209209
const html = await res.text();
210210
const window = new Window();
211211
const document = window.document;

0 commit comments

Comments
 (0)