From 7111adb3c2ec428fe7046d46c00d86e0f11b0d92 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 11 Mar 2014 19:41:58 -0400 Subject: [PATCH] fixed subfolder installs again (a bit), also stopped apple-touch-icon from clobbering /apple-touch-icon --- src/middleware/index.js | 4 ++-- src/middleware/middleware.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/middleware/index.js b/src/middleware/index.js index 008c09210f..f124832b21 100644 --- a/src/middleware/index.js +++ b/src/middleware/index.js @@ -182,7 +182,7 @@ module.exports = function(app, data) { app.use(express.compress()); app.use(express.favicon(path.join(__dirname, '../../', 'public', meta.config['brand:favicon'] ? meta.config['brand:favicon'] : 'favicon.ico'))); - app.use('/apple-touch-icon', middleware.routeTouchIcon); + app.use(nconf.get('relative_path') + '/apple-touch-icon', middleware.routeTouchIcon); app.use(require('less-middleware')({ src: path.join(__dirname, '../../', 'public'), @@ -221,7 +221,7 @@ module.exports = function(app, data) { compileTemplates(pluginTemplates); }); - app.use(app.router); + app.use(nconf.get('relative_path'), app.router); app.use(nconf.get('relative_path'), express.static(path.join(__dirname, '../../', 'public'), { maxAge: app.enabled('cache') ? 5184000000 : 0 diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index c964533b33..c33e4def7d 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -172,7 +172,7 @@ middleware.renderHeader = function(req, res, callback) { }], defaultLinkTags = [{ rel: 'apple-touch-icon', - href: '/apple-touch-icon' + href: nconf.get('relative_path') + '/apple-touch-icon' }], templateValues = { bootswatchCSS: meta.config['theme:src'],