missing middleware
This commit is contained in:
parent
ac198d5b5a
commit
c7e803a94c
13
lib/api/middlewares/custom-profile.js
Normal file
13
lib/api/middlewares/custom-profile.js
Normal file
@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function customProfile () {
|
||||
return function customProfileMiddleware (req, res, next) {
|
||||
const layergroupid = res.get('X-Layergroup-Id') || req.params.token;
|
||||
|
||||
if (layergroupid) {
|
||||
req.profiler.add({ layergroupid });
|
||||
}
|
||||
|
||||
next();
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue
Block a user