Permalink
Browse files

add "x-powered-by" setting

  • Loading branch information...
1 parent 568e0d2 commit 5ac631a270aa9d301bead847b531222fab7cb064 @tj tj committed Sep 13, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −0 lib/application.js
  2. +1 −1 lib/middleware.js
View
@@ -51,6 +51,7 @@ app.defaultConfiguration = function(){
var self = this;
// default settings
+ this.enable('x-powered-by');
this.set('env', process.env.NODE_ENV || 'development');
debug('booting in %s mode', this.get('env'));
View
@@ -18,7 +18,7 @@ var utils = require('./utils');
exports.init = function(app){
return function expressInit(req, res, next){
req.app = res.app = app;
- res.setHeader('X-Powered-By', 'Express');
+ if (app.settings['x-powered-by']) res.setHeader('X-Powered-By', 'Express');
req.res = res;
res.req = req;
req.next = next;

0 comments on commit 5ac631a

Please sign in to comment.