Move favicon further up the middleware stack

This commit is contained in:
Hannah Wolfe 2013-09-18 04:35:08 +01:00
parent 06c3b2dc25
commit 65e00f8418

View File

@ -234,6 +234,9 @@ when.all([ghost.init(), helpers.loadCoreHelpers(ghost)]).then(function () {
server.use(express.logger('dev'));
}
// Favicon
server.use(express.favicon(__dirname + '/shared/favicon.ico'));
// return the correct mime type for woff filess
express['static'].mime.define({'application/font-woff': ['woff']});
// Shared static config
@ -257,7 +260,6 @@ when.all([ghost.init(), helpers.loadCoreHelpers(ghost)]).then(function () {
// Add in all trailing slashes
server.use(slashes());
server.use(express.favicon(__dirname + '/shared/favicon.ico'));
server.use(express.bodyParser({}));
server.use(express.bodyParser({uploadDir: __dirname + '/content/images'}));
server.use(express.cookieParser(ghost.dbHash));