2 * Initialization middleware, exposing the
3 * request and response to each other, as well
4 * as defaulting the X-Powered-By header field.
6 * @param {Function} app
11 exports.init = function(app){
12 return function expressInit(req, res, next){
13 if (app.enabled('x-powered-by')) res.setHeader('X-Powered-By', 'Express');
18 req.__proto__ = app.request;
19 res.__proto__ = app.response;
21 res.locals = res.locals || Object.create(null);