Skip to content

Node.js based forum software built for the modern web

feat: add description and keywords to api/config

Barış Soner Uşaklı933c18f4ac0e
diff --git a/src/controllers/api.js b/src/controllers/api.js
index 2e6bb661fc..d0120b692e 100644
--- a/src/controllers/api.js
+++ b/src/controllers/api.js
@@ -32,6 +32,8 @@ apiController.loadConfig = async function (req) {
assetBaseUrl: asset_base_url, // deprecate in 1.20.x
siteTitle: validator.escape(String(meta.config.title || meta.config.browserTitle || 'NodeBB')),
browserTitle: validator.escape(String(meta.config.browserTitle || meta.config.title || 'NodeBB')),
+ description: validator.escape(String(meta.config.description || '')),
+ keywords: validator.escape(String(meta.config.keywords || '')),
titleLayout: (meta.config.titleLayout || '{pageTitle} | {browserTitle}').replace(/{/g, '{').replace(/}/g, '}'),
showSiteTitle: meta.config.showSiteTitle === 1,
maintenanceMode: meta.config.maintenanceMode === 1,