From e4076ce930fdb4d71ab9f717595e8081ee9536f2 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Thu, 4 Dec 2014 01:01:57 -0800 Subject: [PATCH] remove x-powered-by. Closes #372 --- lib/application.js | 4 ---- test/application.js | 1 - 2 files changed, 5 deletions(-) diff --git a/lib/application.js b/lib/application.js index 2246c62..8bb3642 100644 --- a/lib/application.js +++ b/lib/application.js @@ -41,7 +41,6 @@ function Application() { if (!(this instanceof Application)) return new Application; this.env = process.env.NODE_ENV || 'development'; this.subdomainOffset = 2; - this.poweredBy = true; this.middleware = []; this.context = Object.create(context); this.request = Object.create(request); @@ -82,7 +81,6 @@ app.inspect = app.toJSON = function(){ return only(this, [ 'subdomainOffset', - 'poweredBy', 'env' ]); }; @@ -174,8 +172,6 @@ app.onerror = function(err){ */ function *respond(next) { - if (this.app.poweredBy) this.set('X-Powered-By', 'koa'); - yield *next; // allow bypassing koa diff --git a/test/application.js b/test/application.js index 25a8035..8bfef59 100644 --- a/test/application.js +++ b/test/application.js @@ -57,7 +57,6 @@ describe('app.toJSON()', function(){ obj.should.eql({ subdomainOffset: 2, - poweredBy: true, env: 'test' }); })