host header more explicit
This commit is contained in:
parent
820d3248ca
commit
7879e6fdff
1 changed files with 1 additions and 0 deletions
|
@ -18,6 +18,7 @@ var server = http.createServer(function (req, res) {
|
||||||
res.writeHead(200, {'Content-Type': 'text/plain'});
|
res.writeHead(200, {'Content-Type': 'text/plain'});
|
||||||
|
|
||||||
res.write('This is a node.js echo service\n');
|
res.write('This is a node.js echo service\n');
|
||||||
|
res.write('Host: ' + req.headers.host + '\n');
|
||||||
res.write('\n');
|
res.write('\n');
|
||||||
res.write('node.js Production Mode: ' + (nodeEnv == 'production' ? 'yes' : 'no') + '\n');
|
res.write('node.js Production Mode: ' + (nodeEnv == 'production' ? 'yes' : 'no') + '\n');
|
||||||
res.write('\n');
|
res.write('\n');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue