do not overwrite creation of res.locals

This commit is contained in:
Simon Martín
2017-10-05 17:23:07 +02:00
parent 9083fc2e20
commit 2f310a15bd
2 changed files with 1 additions and 3 deletions
@@ -1,7 +1,7 @@
var LayergroupToken = require('../../models/layergroup-token');
module.exports = function layergroupTokenMiddleware(req, res, next) {
if (!res.locals.hasOwnProperty('token')) {
if (!res.locals.token) {
return next();
}
-2
View File
@@ -369,8 +369,6 @@ function bootstrap(opts) {
app.use(bodyParser.json());
app.use(function bootstrap$prepareRequestResponse(req, res, next) {
res.locals = {};
req.profiler = new Profiler({
statsd_client: global.statsClient,
profile: opts.useProfiler