File tree 3 files changed +0
-14
lines changed
3 files changed +0
-14
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ var colors = require('colors/safe'),
11
11
argv = require ( 'optimist' )
12
12
. boolean ( 'cors' )
13
13
. boolean ( 'log-ip' )
14
- . boolean ( 'server-header' )
15
14
. argv ,
16
15
pjson = require ( '../package.json' ) ;
17
16
@@ -57,7 +56,6 @@ if (argv.h || argv.help) {
57
56
'' ,
58
57
' -r --robots Respond to /robots.txt [User-agent: *\\nDisallow: /]' ,
59
58
' --no-dotfiles Do not show dotfiles' ,
60
- ' --no-server-header Hide the "server" header which identifies ecstatic' ,
61
59
' -h --help Print this list and exit.' ,
62
60
' -v --version Print the version and exit.'
63
61
] . join ( '\n' ) ) ;
@@ -134,7 +132,6 @@ function listen(port) {
134
132
logFn : logger . request ,
135
133
proxy : proxy ,
136
134
showDotfiles : argv . dotfiles ,
137
- serverHeader : argv [ 'server-header' ] ,
138
135
username : argv . username || process . env . NODE_HTTP_SERVER_USERNAME ,
139
136
password : argv . password || process . env . NODE_HTTP_SERVER_PASSWORD
140
137
} ;
Original file line number Diff line number Diff line change @@ -80,7 +80,6 @@ function HttpServer(options) {
80
80
this . showDir = options . showDir !== 'false' ;
81
81
this . autoIndex = options . autoIndex !== 'false' ;
82
82
this . showDotfiles = options . showDotfiles ;
83
- this . serverHeader = options . serverHeader ;
84
83
this . gzip = options . gzip === true ;
85
84
this . brotli = options . brotli === true ;
86
85
this . contentType = options . contentType || 'application/octet-stream' ;
@@ -154,7 +153,6 @@ function HttpServer(options) {
154
153
cache : this . cache ,
155
154
showDir : this . showDir ,
156
155
showDotfiles : this . showDotfiles ,
157
- serverHeader : this . serverHeader ,
158
156
autoIndex : this . autoIndex ,
159
157
defaultExt : this . ext ,
160
158
gzip : this . gzip ,
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ vows.describe('http-server').addBatch({
16
16
var server = httpServer . createServer ( {
17
17
root : root ,
18
18
robots : true ,
19
- serverHeader : false ,
20
19
headers : {
21
20
'Access-Control-Allow-Origin' : '*' ,
22
21
'Access-Control-Allow-Credentials' : 'true'
@@ -80,14 +79,6 @@ vows.describe('http-server').addBatch({
80
79
assert . equal ( res . headers [ 'access-control-allow-credentials' ] , 'true' ) ;
81
80
}
82
81
} ,
83
- 'and serverHeaderis disabled' : {
84
- topic : function ( ) {
85
- request ( 'http://127.0.0.1:8080/' , this . callback ) ;
86
- } ,
87
- 'should not respond with headers from ecstatic' : function ( res ) {
88
- assert . isFalse ( 'server' in res . headers ) ;
89
- }
90
- } ,
91
82
'and the server is set to proxy port 8081 to 8080, ' : {
92
83
topic : function ( ) {
93
84
var proxyServer = httpServer . createServer ( {
You can’t perform that action at this time.
0 commit comments