aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/themes.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/themes.ts')
-rw-r--r--server/middlewares/validators/themes.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/middlewares/validators/themes.ts b/server/middlewares/validators/themes.ts
index 7b9fee858..f6a8c2d92 100644
--- a/server/middlewares/validators/themes.ts
+++ b/server/middlewares/validators/themes.ts
@@ -8,9 +8,12 @@ import { PluginManager } from '../../lib/plugins/plugin-manager'
8import { areValidationErrors } from './shared' 8import { areValidationErrors } from './shared'
9 9
10const serveThemeCSSValidator = [ 10const serveThemeCSSValidator = [
11 param('themeName').custom(isPluginNameValid).withMessage('Should have a valid theme name'), 11 param('themeName')
12 param('themeVersion').custom(isPluginVersionValid).withMessage('Should have a valid theme version'), 12 .custom(isPluginNameValid),
13 param('staticEndpoint').custom(isSafePath).withMessage('Should have a valid static endpoint'), 13 param('themeVersion')
14 .custom(isPluginVersionValid),
15 param('staticEndpoint')
16 .custom(isSafePath),
14 17
15 (req: express.Request, res: express.Response, next: express.NextFunction) => { 18 (req: express.Request, res: express.Response, next: express.NextFunction) => {
16 logger.debug('Checking serveThemeCSS parameters', { parameters: req.params }) 19 logger.debug('Checking serveThemeCSS parameters', { parameters: req.params })