2019-05-07 13:12:54 +00:00
|
|
|
// Copyright IBM Corp. 2014,2019. All Rights Reserved.
|
2016-05-06 04:52:36 +00:00
|
|
|
// Node module: loopback-boot
|
|
|
|
// This file is licensed under the MIT License.
|
|
|
|
// License text available at https://opensource.org/licenses/MIT
|
|
|
|
|
2017-05-08 21:48:48 +00:00
|
|
|
'use strict';
|
|
|
|
|
2014-11-12 15:56:01 +00:00
|
|
|
module.exports = function(name) {
|
|
|
|
return function(req, res, next) {
|
|
|
|
req._names = req._names || [];
|
|
|
|
req._names.push(name);
|
|
|
|
res.setHeader('names', req._names.join(','));
|
|
|
|
next();
|
|
|
|
};
|
|
|
|
};
|