CartoDB-SQL-API/lib/api/middlewares/client-header.js
Álvaro Manera a4a100e65a respond with user-id and client in the headers
added headers to the test-client callback to be able to check them
2020-06-22 09:47:22 +02:00

14 lines
271 B
JavaScript

'use strict';
module.exports = function clientHeader () {
return function clientHeaderMiddleware (req, res, next) {
const { client } = req.query;
if (client) {
res.set('Carto-Client', client);
}
return next();
};
};