Ghost/core/server/services/public-config/config.js
Kevin Ansfield 63b7ef7dc6 Added Tenor contentFilter setting to config
refs https://github.com/TryGhost/Team/issues/1217

- moved top-level `tenorApiKey` to `tenor:apiKey` and added `tenor:contentFilter`
- added base config to `defaults.json`
- updated `public-config.js` and API output serializer to use the new top-level `tenor` key
2021-11-16 17:42:26 +00:00

30 lines
1.2 KiB
JavaScript

const {isPlainObject} = require('lodash');
const config = require('../../../shared/config');
const labs = require('../../../shared/labs');
const ghostVersion = require('@tryghost/version');
module.exports = function getConfigProperties() {
const configProperties = {
version: ghostVersion.full,
environment: config.get('env'),
database: config.get('database').client,
mail: isPlainObject(config.get('mail')) ? config.get('mail').transport : '',
useGravatar: !config.isPrivacyDisabled('useGravatar'),
labs: labs.getAll(),
clientExtensions: config.get('clientExtensions') || {},
enableDeveloperExperiments: config.get('enableDeveloperExperiments') || false,
stripeDirect: config.get('stripeDirect'),
mailgunIsConfigured: config.get('bulkEmail') && config.get('bulkEmail').mailgun,
emailAnalytics: config.get('emailAnalytics'),
hostSettings: config.get('hostSettings'),
tenor: config.get('tenor')
};
const billingUrl = config.get('hostSettings:billing:enabled') ? config.get('hostSettings:billing:url') : '';
if (billingUrl) {
configProperties.billingUrl = billingUrl;
}
return configProperties;
};