mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-01 13:02:43 +00:00
Merge branch 'Issue_1958' of github.com:dbolacksn/homebrewery-broken into Issue_1958
This commit is contained in:
@@ -6,9 +6,7 @@ module.exports = (req, res, next)=>{
|
|||||||
const isImageRequest = req.get('Accept')?.split(',')
|
const isImageRequest = req.get('Accept')?.split(',')
|
||||||
?.filter((h)=>!h.includes('q='))
|
?.filter((h)=>!h.includes('q='))
|
||||||
?.every((h)=>/image\/.*/.test(h));
|
?.every((h)=>/image\/.*/.test(h));
|
||||||
if(isImageRequest &&
|
if(isImageRequest && !isLocalEnvironment && !req.url?.startsWith('/staticImages') {
|
||||||
(!isLocalEnvironment && !req.url?.startsWith('/staticImages'))
|
|
||||||
) {
|
|
||||||
return res.status(406).send({
|
return res.status(406).send({
|
||||||
message : 'Request for image at this URL is not supported'
|
message : 'Request for image at this URL is not supported'
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user