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