Fix(beckend): html content-type detection on signedGet (#14424)
cherry picked from commit bf8c42eecd
Co-authored-by: taichan <40626578+tai-cha@users.noreply.github.com>
This commit is contained in:
parent
b3d4f18175
commit
6d4dc5ea20
1 changed files with 1 additions and 1 deletions
|
@ -204,7 +204,7 @@ export class ApRequestService {
|
|||
//#region リクエスト先がhtmlかつactivity+jsonへのalternate linkタグがあるとき
|
||||
const contentType = res.headers.get('content-type');
|
||||
|
||||
if ((contentType === 'text/html' || contentType?.startsWith('text/html;')) && _followAlternate) {
|
||||
if ((contentType ?? '').split(';')[0].trimEnd().toLowerCase() === 'text/html' && _followAlternate) {
|
||||
const html = await res.text();
|
||||
const fragment = JSDOM.fragment(html);
|
||||
|
||||
|
|
Loading…
Reference in a new issue