Fix frontend not updating publicConfig.json
This changes the handshake sequence to use “bootTime” (a unique key based off the time) to make sure the frontend configuration matches the current one. If not, the client pulls the update and validates before requesting the listing.
This commit is contained in:
@ -4,6 +4,7 @@ var url = require('url');
|
||||
var mime = require('mime');
|
||||
var io = require('socket.io');
|
||||
|
||||
var util = require('./util');
|
||||
var logger = require('./logger');
|
||||
|
||||
var config = require('../config.json');
|
||||
@ -65,7 +66,8 @@ function handleRequest(req, res) {
|
||||
var publicConfig = {
|
||||
categories: categories,
|
||||
graphDuration: config.graphDuration,
|
||||
servers: servers
|
||||
servers: servers,
|
||||
bootTime: util.getBootTime()
|
||||
};
|
||||
|
||||
res.write('setPublicConfig(' + JSON.stringify(publicConfig) + ');');
|
||||
|
Reference in New Issue
Block a user