mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-23 17:00:24 +01:00
added cache buster to require.js files - fixes #687
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<link rel="icon" type="image/x-icon" href="{brand:favicon}" />
|
||||
<link href="{cssSrc}" rel="stylesheet" media="screen">
|
||||
<link rel="stylesheet" href="{relative_path}/vendor/fontawesome/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="{relative_path}/css/theme.css{cache-buster}" />
|
||||
<link rel="stylesheet" type="text/css" href="{relative_path}/css/theme.css?{cache-buster}" />
|
||||
{link_tags}
|
||||
<!-- BEGIN pluginCSS -->
|
||||
<link rel="stylesheet" href="{pluginCSS.path}">
|
||||
@@ -22,6 +22,7 @@
|
||||
require.config({
|
||||
baseUrl: "{relative_path}/src/modules",
|
||||
waitSeconds: 3,
|
||||
urlArgs: "{cache-buster}",
|
||||
paths: {
|
||||
"forum": '../forum'
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ var path = require('path'),
|
||||
link_tags: linkTags,
|
||||
clientScripts: clientScripts,
|
||||
navigation: custom_header.navigation,
|
||||
'cache-buster': meta.config['cache-buster'] ? '?v=' + meta.config['cache-buster'] : '',
|
||||
'cache-buster': meta.config['cache-buster'] ? 'v=' + meta.config['cache-buster'] : '',
|
||||
allowRegistration: meta.config.allowRegistration === undefined || parseInt(meta.config.allowRegistration, 10) === 1
|
||||
};
|
||||
|
||||
@@ -132,15 +132,10 @@ var path = require('path'),
|
||||
}, function(err, stdOut) {
|
||||
if (!err) {
|
||||
meta.config['cache-buster'] = stdOut.trim();
|
||||
|
||||
if (global.env === 'development') {
|
||||
winston.info('[init] Cache buster value set to: ' + stdOut);
|
||||
}
|
||||
// winston.info('[init] Cache buster value set to: ' + stdOut);
|
||||
} else {
|
||||
if (global.env === 'development') {
|
||||
winston.warn('[init] Cache buster not set');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user