Skip to content
Myr

Added X-Powered-By, remove Connects "Server" header field

Before adoption: this commit came in with the history the project adopted, so no landing records it.

potentially a security issue... I told Tim not to add this :p, so for now we just hide it in Express until I have a chance to remove it from Connect, at least the versions.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 1c9831a · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:lib/express/server.js+4 added-1 removed
40 unmodified lines
41 process.env.NODE_ENV = process.env.EXPRESS_ENV;42 console.warn('\x1b[33mWarning\x1b[0m: EXPRESS_ENV is deprecated, use NODE_ENV.');43 }4445 // TODO: remove when Connect removes "Server" ...46 this.showVersion = false;4748 // Set "env" to NODE_ENV, defaulting to "development"49 this.set('env', process.env.NODE_ENV || 'development');5051 // Expose objects to each other52 this.use(function(req, res, next){53 req.query = {};51 res.headers = {};54 res.headers = { 'X-Powered-By': 'Express' };55 req.app = res.app = self;56 req.res = res;57 res.req = req;58 req.next = next;
291 unmodified lines