Skip to content

x-forwarded-for not being set properly #107

Closed
jfhbrook opened this Issue Sep 12, 2011 · 1 comment

4 participants

@jfhbrook

Via Assistly:

Re: [nodejs] Express logger, output the client ip while using a proxy
Fabryz -

This would probably be best sent to support@nodejitsu.com or just drop into
the #nodejitsu IRC room.

x-forwarded-for should be set by node-http-proxy, maybe it's not getting
set? I've forwarded this email to our support team and we'll have someone
look into it.

Thanks!

  • Marak

On Sun, Sep 11, 2011 at 4:19 AM, Fabryz wrote:

Hello,
I tried asking in #node.js and #express but no one answered, so let's
try here:

At the moment I'm using this format on express.logger:
app.use(express.logger(':remote-addr - :method :url HTTP/:http-
version :status :res[content-length] - :response-time ms'));

But on the logs on my hosted app in nodejitsu it actually shows their
proxy IP on every request. How to show the real connected client's IP?

Tried with :req[x-forwarded-for] but didn't work.

@dominictarr dominictarr was assigned Sep 12, 2011
@indexzero
nodejitsu member

@dominictarr Can you create a sample app which attempts to reproduce this issue?

@AvianFlu AvianFlu closed this in 5ad7739 Sep 21, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.