Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x-forwarded-for not being set properly #107

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

x-forwarded-for not being set properly #107

jfhbrook opened this issue Sep 12, 2011 · 1 comment

Comments

@jfhbrook
Copy link
Contributor

Via Assistly:

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

This would probably be best sent to [email protected] 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.

@ghost ghost assigned dominictarr Sep 12, 2011
@indexzero
Copy link
Contributor

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

AvianFlu added a commit that referenced this issue Sep 21, 2011
#107: Set x-forwarded-for header (amongst others)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants