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:
parent
1d94c15468
commit
e032aec9b9
10 changed files with 290 additions and 174 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue