mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-22 16:36:58 +00:00
Fixes #3904 - content negotiation test failure
This commit is contained in:
1 parent
b7c49218ae
commit
1af13b4e94
1 file changed
+1
-1
@@ -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'
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user