Windshaft-cartodb/lib/api/middlewares/client-header.js

14 lines
271 B
JavaScript
Raw Normal View History

'use strict';
module.exports = function clientHeader () {
return function clientHeaderMiddleware (req, res, next) {
const { client } = req.query;
2020-05-26 22:31:53 +08:00
if (client) {
res.set('Carto-Client', client);
}
return next();
};
};