Skip to content

Commit

Permalink
Fixes #3904 - content negotiation test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Ambatte authored Nov 21, 2024
1 parent b7c4921 commit 1af13b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/middleware/content-negotiation.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = (req, res, next)=>{
const isImageRequest = req.get('Accept')?.split(',')
?.filter((h)=>!h.includes('q='))
?.every((h)=>/image\/.*/.test(h));
if(isImageRequest && !isLocalEnvironment && !req.url?.startsWith('/staticImages')) {
if(isImageRequest && !(isLocalEnvironment && req.url?.startsWith('/staticImages'))) {
return res.status(406).send({
message : 'Request for image at this URL is not supported'
});
Expand Down

0 comments on commit 1af13b4

Please sign in to comment.