mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-04 11:31:23 +01:00
Cache bust translations, query param name
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
(function (factory) {
|
||||
'use strict';
|
||||
function loadClient(language, namespace) {
|
||||
return Promise.resolve(jQuery.getJSON(config.relative_path + '/public/language/' + language + '/' + namespace + '.json'));
|
||||
return Promise.resolve(jQuery.getJSON(config.relative_path + '/public/language/' + language + '/' + namespace + '.json?' + config['cache-buster']));
|
||||
}
|
||||
var warn = function () {};
|
||||
if (typeof config === 'object' && config.environment === 'development') {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require.config({
|
||||
baseUrl: config.relative_path + "/src/modules",
|
||||
waitSeconds: 7,
|
||||
urlArgs: "v=" + config['cache-buster'],
|
||||
urlArgs: config['cache-buster'],
|
||||
paths: {
|
||||
'forum': '../client',
|
||||
'admin': '../admin',
|
||||
|
||||
@@ -21,7 +21,7 @@ module.exports = function (Meta) {
|
||||
Meta.configs.list(next);
|
||||
},
|
||||
function (config, next) {
|
||||
config['cache-buster'] = utils.generateUUID();
|
||||
config['cache-buster'] = 'v=' + utils.generateUUID();
|
||||
|
||||
Meta.config = config;
|
||||
setImmediate(next);
|
||||
|
||||
@@ -144,7 +144,7 @@ module.exports = function (app, middleware, hotswapIds) {
|
||||
}
|
||||
|
||||
app.use(middleware.privateUploads);
|
||||
app.use(relativePath + '/public/language', express.static(path.join(__dirname, '../../', 'build/public/language'), {
|
||||
app.use(relativePath + '/public', express.static(path.join(__dirname, '../../', 'build/public'), {
|
||||
maxAge: app.enabled('cache') ? 5184000000 : 0
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user