1 import * as express from 'express'
3 import { isSignupAllowed } from '../../helpers'
4 import { CONFIG } from '../../initializers'
5 import { asyncMiddleware } from '../../middlewares'
6 import { ServerConfig } from '../../../shared'
8 const configRouter = express.Router()
11 asyncMiddleware(getConfig)
14 async function getConfig (req: express.Request, res: express.Response, next: express.NextFunction) {
15 const allowed = await isSignupAllowed()
17 const enabledResolutions = Object.keys(CONFIG.TRANSCODING.RESOLUTIONS)
18 .filter(key => CONFIG.TRANSCODING.RESOLUTIONS[key] === true)
19 .map(r => parseInt(r, 10))
21 const json: ServerConfig = {
33 // ---------------------------------------------------------------------------