mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Refactored variable name to match intent
no issue
This commit is contained in:
parent
55bd1cdd6b
commit
6dcb1094aa
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue