aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/plugins.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/plugins.ts')
-rw-r--r--server/controllers/plugins.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/plugins.ts b/server/controllers/plugins.ts
index 18c6613e2..6a1ccc0bf 100644
--- a/server/controllers/plugins.ts
+++ b/server/controllers/plugins.ts
@@ -9,6 +9,7 @@ import { getCompleteLocale, is18nLocale } from '../../shared/core-utils/i18n'
9import { PluginType } from '../../shared/models/plugins/plugin.type' 9import { PluginType } from '../../shared/models/plugins/plugin.type'
10import { isTestInstance } from '../helpers/core-utils' 10import { isTestInstance } from '../helpers/core-utils'
11import { logger } from '@server/helpers/logger' 11import { logger } from '@server/helpers/logger'
12import { optionalAuthenticate } from '@server/middlewares/oauth'
12 13
13const sendFileOptions = { 14const sendFileOptions = {
14 maxAge: '30 days', 15 maxAge: '30 days',
@@ -45,11 +46,13 @@ pluginsRouter.get('/plugins/:pluginName/:pluginVersion/client-scripts/:staticEnd
45 46
46pluginsRouter.use('/plugins/:pluginName/router', 47pluginsRouter.use('/plugins/:pluginName/router',
47 getPluginValidator(PluginType.PLUGIN, false), 48 getPluginValidator(PluginType.PLUGIN, false),
49 optionalAuthenticate,
48 servePluginCustomRoutes 50 servePluginCustomRoutes
49) 51)
50 52
51pluginsRouter.use('/plugins/:pluginName/:pluginVersion/router', 53pluginsRouter.use('/plugins/:pluginName/:pluginVersion/router',
52 getPluginValidator(PluginType.PLUGIN), 54 getPluginValidator(PluginType.PLUGIN),
55 optionalAuthenticate,
53 servePluginCustomRoutes 56 servePluginCustomRoutes
54) 57)
55 58