remove x-powered-by. Closes #372

master
TJ Holowaychuk 2014-12-04 01:01:57 -08:00
parent 54ca7753fd
commit e4076ce930
2 changed files with 0 additions and 5 deletions

View File

@ -41,7 +41,6 @@ function Application() {
if (!(this instanceof Application)) return new Application; if (!(this instanceof Application)) return new Application;
this.env = process.env.NODE_ENV || 'development'; this.env = process.env.NODE_ENV || 'development';
this.subdomainOffset = 2; this.subdomainOffset = 2;
this.poweredBy = true;
this.middleware = []; this.middleware = [];
this.context = Object.create(context); this.context = Object.create(context);
this.request = Object.create(request); this.request = Object.create(request);
@ -82,7 +81,6 @@ app.inspect =
app.toJSON = function(){ app.toJSON = function(){
return only(this, [ return only(this, [
'subdomainOffset', 'subdomainOffset',
'poweredBy',
'env' 'env'
]); ]);
}; };
@ -174,8 +172,6 @@ app.onerror = function(err){
*/ */
function *respond(next) { function *respond(next) {
if (this.app.poweredBy) this.set('X-Powered-By', 'koa');
yield *next; yield *next;
// allow bypassing koa // allow bypassing koa

View File

@ -57,7 +57,6 @@ describe('app.toJSON()', function(){
obj.should.eql({ obj.should.eql({
subdomainOffset: 2, subdomainOffset: 2,
poweredBy: true,
env: 'test' env: 'test'
}); });
}) })