mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-03 00:15:11 +03:00
🐛 fix favicon path (#8190)
closes #8187 - if you start Ghost via the Ghost-CLI, the path to the favicon must be absolute - because the CLI spawns a Ghost process from the root folder of the CLI folder e.g. node current/index.js
This commit is contained in:
parent
495eee7747
commit
e903be6679
@ -1,9 +1,10 @@
|
||||
var fs = require('fs'),
|
||||
var fs = require('fs'),
|
||||
path = require('path'),
|
||||
storage = require('../storage'),
|
||||
settingsCache = require('../settings/cache'),
|
||||
utils = require('../utils'),
|
||||
crypto = require('crypto'),
|
||||
config = require('../config'),
|
||||
storage = require('../storage'),
|
||||
utils = require('../utils'),
|
||||
settingsCache = require('../settings/cache'),
|
||||
buildContentResponse,
|
||||
content;
|
||||
|
||||
@ -59,7 +60,7 @@ function serveFavicon() {
|
||||
res.end(content.body);
|
||||
});
|
||||
} else {
|
||||
filePath = 'core/shared/favicon.ico';
|
||||
filePath = path.join(config.get('paths:corePath'), 'shared', 'favicon.ico');
|
||||
originalExtension = path.extname(filePath).toLowerCase();
|
||||
|
||||
// CASE: always redirect to .ico for default icon
|
||||
|
@ -87,8 +87,6 @@ describe('Serve Favicon', function () {
|
||||
it('default favicon.ico', function (done) {
|
||||
var middleware = serveFavicon();
|
||||
req.path = '/favicon.ico';
|
||||
|
||||
configUtils.set('paths:corePath', path.join(__dirname, '../../../test/utils/fixtures/'));
|
||||
localSettingsCache.icon = '';
|
||||
|
||||
res = {
|
||||
|
Loading…
Reference in New Issue
Block a user