1 import * as express from 'express'
3 import { isSignupAllowed } from '../../helpers'
4 import { CONFIG } from '../../initializers'
5 import { ServerConfig } from '../../../shared'
7 const configRouter = express.Router()
9 configRouter.get('/', getConfig)
11 function getConfig (req: express.Request, res: express.Response, next: express.NextFunction) {
13 isSignupAllowed().then(allowed => {
14 const enabledResolutions = Object.keys(CONFIG.TRANSCODING.RESOLUTIONS)
15 .filter(key => CONFIG.TRANSCODING.RESOLUTIONS[key] === true)
16 .map(r => parseInt(r, 10))
18 const json: ServerConfig = {
31 // ---------------------------------------------------------------------------