fix(favicon): specify favicon, fixes #3331
This commit is contained in:
+4
-3
@@ -92,6 +92,7 @@ if (cluster.isMaster && (isDev || isProd)) {
|
||||
));
|
||||
|
||||
// ------------ Server Configuration ------------
|
||||
var publicDir = path.join(__dirname, "/../public");
|
||||
|
||||
app.set("port", nconf.get('PORT'));
|
||||
middleware.apiThrottle(app);
|
||||
@@ -100,7 +101,7 @@ if (cluster.isMaster && (isDev || isProd)) {
|
||||
app.use(express.compress());
|
||||
app.set("views", __dirname + "/../views");
|
||||
app.set("view engine", "jade");
|
||||
app.use(express.favicon());
|
||||
app.use(express.favicon(publicDir + '/favicon.ico'));
|
||||
app.use(middleware.cors);
|
||||
app.use(middleware.forceSSL);
|
||||
app.use(express.urlencoded());
|
||||
@@ -121,8 +122,8 @@ if (cluster.isMaster && (isDev || isProd)) {
|
||||
var maxAge = isProd ? 31536000000 : 0;
|
||||
// Cache emojis without copying them to build, they are too many
|
||||
app.use(express['static'](path.join(__dirname, "/../build"), { maxAge: maxAge }));
|
||||
app.use('/bower_components/habitrpg-shared/img/emoji/unicode', express['static'](path.join(__dirname, "/../public/bower_components/habitrpg-shared/img/emoji/unicode"), { maxAge: maxAge }));
|
||||
app.use(express['static'](path.join(__dirname, "/../public")));
|
||||
app.use('/bower_components/habitrpg-shared/img/emoji/unicode', express['static'](publicDir + "/bower_components/habitrpg-shared/img/emoji/unicode", { maxAge: maxAge }));
|
||||
app.use(express['static'](publicDir));
|
||||
|
||||
// Custom Directives
|
||||
app.use(require('./routes/pages').middleware);
|
||||
|
||||
Reference in New Issue
Block a user