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.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

@ -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'],

Loading…
Cancel
Save