UNPKG

connect-powered-by

Version:

X-Powered-By header middleware for Connect.

19 lines (17 loc) 332 B
/** * Set `X-Powered-By` header on response. * * @return {Function} * @api public */ module.exports = function poweredBy(tech) { tech = tech || null; return function(req, res, next) { if (tech) { res.setHeader('X-Powered-By', tech); } else { res.removeHeader('X-Powered-By'); } next(); } }