From e032aec9b92be25a996923361f83a96a89505254 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 18 Jul 2018 09:52:46 +0200 Subject: Render CSS/title/description tags on server side --- server/controllers/api/config.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'server/controllers/api/config.ts') diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts index 3788975a9..9c1b2818c 100644 --- a/server/controllers/api/config.ts +++ b/server/controllers/api/config.ts @@ -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() -- cgit v1.2.3