fixed subfolder installs again (a bit), also stopped apple-touch-icon from clobbering /apple-touch-icon

v1.18.x
Julian Lam 11 years ago
parent a500899fdf
commit 7111adb3c2

@ -182,7 +182,7 @@ module.exports = function(app, data) {
app.use(express.compress()); app.use(express.compress());
app.use(express.favicon(path.join(__dirname, '../../', 'public', meta.config['brand:favicon'] ? meta.config['brand:favicon'] : 'favicon.ico'))); 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')({ app.use(require('less-middleware')({
src: path.join(__dirname, '../../', 'public'), src: path.join(__dirname, '../../', 'public'),
@ -221,7 +221,7 @@ module.exports = function(app, data) {
compileTemplates(pluginTemplates); 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'), { app.use(nconf.get('relative_path'), express.static(path.join(__dirname, '../../', 'public'), {
maxAge: app.enabled('cache') ? 5184000000 : 0 maxAge: app.enabled('cache') ? 5184000000 : 0

@ -172,7 +172,7 @@ middleware.renderHeader = function(req, res, callback) {
}], }],
defaultLinkTags = [{ defaultLinkTags = [{
rel: 'apple-touch-icon', rel: 'apple-touch-icon',
href: '/apple-touch-icon' href: nconf.get('relative_path') + '/apple-touch-icon'
}], }],
templateValues = { templateValues = {
bootswatchCSS: meta.config['theme:src'], bootswatchCSS: meta.config['theme:src'],

Loading…
Cancel
Save