do not overwrite creation of res.locals
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user