From 96cd6df6fad5eea9f5b5592c93585fe31a575c46 Mon Sep 17 00:00:00 2001 From: Fabien 'egg' O'Carroll Date: Mon, 15 Aug 2022 15:38:19 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20Comments=20administratio?= =?UTF-8?q?n=20for=20self=20hosters=20(#15239)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refs https://github.com/TryGhost/Team/issues/1799 Rather than using the `adminAuthAssets` config which is not updated to be aware of running in a different directory to the cwd, we use the getContentPath method which handles all of the directory checking. Without this, we were unable to serve the admin-auth iframe, as the directory was incorrect for self hosters. --- ghost/core/core/server/web/admin/app.js | 2 +- ghost/core/core/shared/config/overrides.json | 1 - ghost/core/test/unit/shared/config/loader.test.js | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ghost/core/core/server/web/admin/app.js b/ghost/core/core/server/web/admin/app.js index 993986aaa2..04d1775be1 100644 --- a/ghost/core/core/server/web/admin/app.js +++ b/ghost/core/core/server/web/admin/app.js @@ -23,7 +23,7 @@ module.exports = function setupAdminApp() { )); adminApp.use('/auth-frame', serveStatic( - config.get('paths').adminAuthAssets + path.join(config.getContentPath('public'), 'admin-auth') )); // Ember CLI's live-reload script diff --git a/ghost/core/core/shared/config/overrides.json b/ghost/core/core/shared/config/overrides.json index 9e06dceabc..74eab16b27 100644 --- a/ghost/core/core/shared/config/overrides.json +++ b/ghost/core/core/shared/config/overrides.json @@ -3,7 +3,6 @@ "appRoot": ".", "corePath": "core/", "adminAssets": "core/built/admin", - "adminAuthAssets": "content/public/admin-auth", "helperTemplates": "core/frontend/helpers/tpl/", "defaultViews": "core/server/views/", "defaultRouteSettings": "core/server/services/route-settings/", diff --git a/ghost/core/test/unit/shared/config/loader.test.js b/ghost/core/test/unit/shared/config/loader.test.js index 7d55900002..b9139b2446 100644 --- a/ghost/core/test/unit/shared/config/loader.test.js +++ b/ghost/core/test/unit/shared/config/loader.test.js @@ -102,7 +102,6 @@ describe('Config Loader', function () { 'appRoot', 'corePath', 'adminAssets', - 'adminAuthAssets', 'helperTemplates', 'defaultViews', 'defaultRouteSettings',