diff --git a/core/server/web/shared/middlewares/image/handle-image-sizes.js b/core/server/web/shared/middlewares/image/handle-image-sizes.js index 5516500650..626bda0694 100644 --- a/core/server/web/shared/middlewares/image/handle-image-sizes.js +++ b/core/server/web/shared/middlewares/image/handle-image-sizes.js @@ -4,14 +4,14 @@ const storage = require('../../../../adapters/storage'); const activeTheme = require('../../../../../frontend/services/themes/active'); const SIZE_PATH_REGEX = /^\/size\/([^/]+)\//; -const NO_TRAILING_SLASH_REGEX = /\/+$/; +const TRAILING_SLASH_REGEX = /\/+$/; module.exports = function (req, res, next) { if (!SIZE_PATH_REGEX.test(req.url)) { return next(); } - if (NO_TRAILING_SLASH_REGEX.test(req.url)) { + if (TRAILING_SLASH_REGEX.test(req.url)) { return next(); }