fix(backend/ActivityPubServerService): apOrHtml Constraintが正しく評価されない問題を修正 (MisskeyIO#869)
This commit is contained in:
parent
6dcda9db5c
commit
88a361e622
1 changed files with 2 additions and 2 deletions
|
@ -524,8 +524,8 @@ export class ActivityPubServerService {
|
||||||
},
|
},
|
||||||
deriveConstraint(request: IncomingMessage) {
|
deriveConstraint(request: IncomingMessage) {
|
||||||
const accepted = accepts(request).type(['html', ACTIVITY_JSON, LD_JSON]);
|
const accepted = accepts(request).type(['html', ACTIVITY_JSON, LD_JSON]);
|
||||||
const isAp = typeof accepted === 'string' && !accepted.match(/html/);
|
if (accepted === false) return null;
|
||||||
return isAp ? 'ap' : 'html';
|
return accepted !== 'html' ? 'ap' : 'html';
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue