canot get local ip? #147

Closed
l5oo00 opened this Issue Mar 11, 2012 · 4 comments

Projects

None yet

2 participants

@l5oo00

as the title.

@tjanczuk
Owner

What is the code you are running, what do you expect to see, and what happens instead?

@l5oo00

code:
var http = require('http');

http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
var k=req.headers['x-forwarded-for'] || req.connection.remoteAddress;
res.end('Hello, world!
'+k+'
'+'test');
}).listen(process.env.PORT);

expect to see:
Hello,world!
127.0.0.1
test

@tjanczuk
Owner

See #94 for solution.

@l5oo00

Thank you.

@l5oo00 l5oo00 closed this Mar 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment