X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fvalidators%2Ffeeds.ts;h=f34c2b174527085750e48ac5bc11c4e3e549bdae;hb=2158ac90341dc3fcae958540de65032da25c8d6e;hp=29f6c87bebfaa35890b5d31556ccdae86c739742;hpb=f2f0eda543ab54eec0f6bcdd8ccf6e382d5cafb6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/middlewares/validators/feeds.ts b/server/middlewares/validators/feeds.ts index 29f6c87be..f34c2b174 100644 --- a/server/middlewares/validators/feeds.ts +++ b/server/middlewares/validators/feeds.ts @@ -22,13 +22,13 @@ function setFeedFormatContentType (req: express.Request, res: express.Response, let acceptableContentTypes: string[] if (format === 'atom' || format === 'atom1') { - acceptableContentTypes = ['application/atom+xml', 'application/xml', 'text/xml'] + acceptableContentTypes = [ 'application/atom+xml', 'application/xml', 'text/xml' ] } else if (format === 'json' || format === 'json1') { - acceptableContentTypes = ['application/json'] + acceptableContentTypes = [ 'application/json' ] } else if (format === 'rss' || format === 'rss2') { - acceptableContentTypes = ['application/rss+xml', 'application/xml', 'text/xml'] + acceptableContentTypes = [ 'application/rss+xml', 'application/xml', 'text/xml' ] } else { - acceptableContentTypes = ['application/xml', 'text/xml'] + acceptableContentTypes = [ 'application/xml', 'text/xml' ] } if (req.accepts(acceptableContentTypes)) {