X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Factivitypub.ts;h=45899818e57d243615255adad470868b0eba5075;hb=76314386aeafdd6849b7b70c517779d6b2013473;hp=ab7d04d25b85a2056b885a65eaf841852033306c;hpb=818c449b3c34e9f324ac744120c8774e724ab25e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/middlewares/activitypub.ts b/server/middlewares/activitypub.ts index ab7d04d25..45899818e 100644 --- a/server/middlewares/activitypub.ts +++ b/server/middlewares/activitypub.ts @@ -38,7 +38,7 @@ async function checkSignature (req: Request, res: Response, next: NextFunction) function executeIfActivityPub (req: Request, res: Response, next: NextFunction) { const accepted = req.accepts(ACCEPT_HEADERS) - if (accepted === false || ACTIVITY_PUB.POTENTIAL_ACCEPT_HEADERS.indexOf(accepted) === -1) { + if (accepted === false || ACTIVITY_PUB.POTENTIAL_ACCEPT_HEADERS.includes(accepted) === false) { // Bypass this route return next('route') }