Skip to content

x-forwarded-for not being set properly #107

Closed
@jfhbrook

Description

@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions