diff --git a/server/middleware/content-negotiation.js b/server/middleware/content-negotiation.js index 201e64a25..823da94e7 100644 --- a/server/middleware/content-negotiation.js +++ b/server/middleware/content-negotiation.js @@ -2,11 +2,11 @@ module.exports = (req, res, next)=>{ const isImageRequest = req.get('Accept')?.split(',') ?.filter((h)=>!h.includes('q=')) ?.every((h)=>/image\/.*/.test(h)); - if(isImageRequest) { + if(isImageRequest && !req.url?.startsWith('/staticImages/') { return res.status(406).send({ message : 'Request for image at this URL is not supported' }); } next(); -}; \ No newline at end of file +};