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 rel="icon" type="image/x-icon" href="{brand:favicon}" />
|
||||||
<link href="{cssSrc}" rel="stylesheet" media="screen">
|
<link href="{cssSrc}" rel="stylesheet" media="screen">
|
||||||
<link rel="stylesheet" href="{relative_path}/vendor/fontawesome/css/font-awesome.min.css">
|
<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}
|
{link_tags}
|
||||||
<!-- BEGIN pluginCSS -->
|
<!-- BEGIN pluginCSS -->
|
||||||
<link rel="stylesheet" href="{pluginCSS.path}">
|
<link rel="stylesheet" href="{pluginCSS.path}">
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
require.config({
|
require.config({
|
||||||
baseUrl: "{relative_path}/src/modules",
|
baseUrl: "{relative_path}/src/modules",
|
||||||
waitSeconds: 3,
|
waitSeconds: 3,
|
||||||
|
urlArgs: "{cache-buster}",
|
||||||
paths: {
|
paths: {
|
||||||
"forum": '../forum'
|
"forum": '../forum'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ var path = require('path'),
|
|||||||
link_tags: linkTags,
|
link_tags: linkTags,
|
||||||
clientScripts: clientScripts,
|
clientScripts: clientScripts,
|
||||||
navigation: custom_header.navigation,
|
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
|
allowRegistration: meta.config.allowRegistration === undefined || parseInt(meta.config.allowRegistration, 10) === 1
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -132,14 +132,9 @@ var path = require('path'),
|
|||||||
}, function(err, stdOut) {
|
}, function(err, stdOut) {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
meta.config['cache-buster'] = stdOut.trim();
|
meta.config['cache-buster'] = stdOut.trim();
|
||||||
|
// winston.info('[init] Cache buster value set to: ' + stdOut);
|
||||||
if (global.env === 'development') {
|
|
||||||
winston.info('[init] Cache buster value set to: ' + stdOut);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (global.env === 'development') {
|
winston.warn('[init] Cache buster not set');
|
||||||
winston.warn('[init] Cache buster not set');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user