1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Render CSS/title/description tags on server side

This commit is contained in:
Chocobozzz 2018-07-18 09:52:46 +02:00
parent 1d94c15468
commit e032aec9b9
No known key found for this signature in database
GPG key ID: 583A612D890159BE
10 changed files with 290 additions and 174 deletions

View file

@ -8,6 +8,7 @@ import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/util
import { CONFIG, CONSTRAINTS_FIELDS, reloadConfig } from '../../initializers'
import { asyncMiddleware, authenticate, ensureUserHasRight } from '../../middlewares'
import { customConfigUpdateValidator } from '../../middlewares/validators/config'
import { ClientHtml } from '../../lib/client-html'
const packageJSON = require('../../../../package.json')
const configRouter = express.Router()
@ -119,6 +120,7 @@ async function deleteCustomConfig (req: express.Request, res: express.Response,
await unlinkPromise(CONFIG.CUSTOM_FILE)
reloadConfig()
ClientHtml.invalidCache()
const data = customConfig()
@ -145,6 +147,7 @@ async function updateCustomConfig (req: express.Request, res: express.Response,
await writeFilePromise(CONFIG.CUSTOM_FILE, JSON.stringify(toUpdateJSON, undefined, 2))
reloadConfig()
ClientHtml.invalidCache()
const data = customConfig()
return res.json(data).end()