From ae3137da4066e5cc4c7f65716e337f4aa82c8dbb Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Tue, 2 Mar 2021 12:42:09 +0000 Subject: [PATCH] Updated config to pull additional host settings ref https://github.com/TryGhost/Admin/commit/e1e5caac3d7e838770ea6bf364d3b48e9f50e87a - we are working on separating out various host functions into separate applications, all of which Ghost can load if configured --- core/server/api/canary/config.js | 9 +++++++++ core/server/api/v3/config.js | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/core/server/api/canary/config.js b/core/server/api/canary/config.js index 183e0e7942..44e513e10d 100644 --- a/core/server/api/canary/config.js +++ b/core/server/api/canary/config.js @@ -10,6 +10,8 @@ module.exports = { permissions: false, query() { const billingUrl = config.get('host_settings:billing:enabled') ? config.get('host_settings:billing:url') : ''; + const domainUrl = config.get('host_settings:domain:enabled') ? config.get('host_settings:domain:url') : ''; + const updateUrl = config.get('host_settings:update:enabled') ? config.get('host_settings:update:url') : ''; const response = { version: ghostVersion.full, environment: config.get('env'), @@ -26,6 +28,13 @@ module.exports = { if (billingUrl) { response.billingUrl = billingUrl; } + if (domainUrl) { + response.domainUrl = domainUrl; + } + if (updateUrl) { + response.updateUrl = updateUrl; + } + return response; } } diff --git a/core/server/api/v3/config.js b/core/server/api/v3/config.js index 183e0e7942..44e513e10d 100644 --- a/core/server/api/v3/config.js +++ b/core/server/api/v3/config.js @@ -10,6 +10,8 @@ module.exports = { permissions: false, query() { const billingUrl = config.get('host_settings:billing:enabled') ? config.get('host_settings:billing:url') : ''; + const domainUrl = config.get('host_settings:domain:enabled') ? config.get('host_settings:domain:url') : ''; + const updateUrl = config.get('host_settings:update:enabled') ? config.get('host_settings:update:url') : ''; const response = { version: ghostVersion.full, environment: config.get('env'), @@ -26,6 +28,13 @@ module.exports = { if (billingUrl) { response.billingUrl = billingUrl; } + if (domainUrl) { + response.domainUrl = domainUrl; + } + if (updateUrl) { + response.updateUrl = updateUrl; + } + return response; } }