]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/plugins.ts
Add TMP persistent directory
[github/Chocobozzz/PeerTube.git] / server / controllers / plugins.ts
index 11ab3f10ab47ee7b39c85aef2c034d08078414f9..51db1ad89f4c5798ffce0d50fd6e0275df2ccd1e 100644 (file)
@@ -1,11 +1,11 @@
-import * as express from 'express'
+import express from 'express'
 import { join } from 'path'
 import { logger } from '@server/helpers/logger'
 import { optionalAuthenticate } from '@server/middlewares/auth'
 import { getCompleteLocale, is18nLocale } from '../../shared/core-utils/i18n'
 import { HttpStatusCode } from '../../shared/models/http/http-error-codes'
 import { PluginType } from '../../shared/models/plugins/plugin.type'
-import { isTestInstance } from '../helpers/core-utils'
+import { isProdInstance } from '../helpers/core-utils'
 import { PLUGIN_GLOBAL_CSS_PATH } from '../initializers/constants'
 import { PluginManager, RegisteredPlugin } from '../lib/plugins/plugin-manager'
 import { getExternalAuthValidator, getPluginValidator, pluginStaticDirectoryValidator } from '../middlewares/validators/plugins'
@@ -13,7 +13,7 @@ import { serveThemeCSSValidator } from '../middlewares/validators/themes'
 
 const sendFileOptions = {
   maxAge: '30 days',
-  immutable: !isTestInstance()
+  immutable: isProdInstance()
 }
 
 const pluginsRouter = express.Router()