Lars,<br>How did you get pen to disable the x-forwarded-for header. I didnt see an option in the pen man page. I only see the below option<br><br><dl compact="compact"><dt>-H</dt><dd>
Adds X-Forwarded-For header to http requests.</dd></dl>Thanks!<br>Sunder<br><br><br><div><span class="gmail_quote">On 7/9/06, <b class="gmail_sendername">Lars Pind</b> &lt;<a href="mailto:lars@pinds.com">lars@pinds.com</a>
&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">FYI, I've found that pen lets you disable the X-Forwarded-For header,<br>so I'm using that instead, and Rails picks up the right IP address.
<br><br>I also noticed that pen.c has code to not add an X-Forwarded-For<br>header if one is already present, but it didn't seem to be working<br>for me.<br><br>/Lars<br><br>On Jul 9, 2006, at 3:14 PM, Lars Pind wrote:<br>
<br>&gt; Right, but how does that help fix the problem?<br>&gt;<br>&gt; The problem is that Pound overrides the X-Forwarded-For header<br>&gt; already being added by lighty.<br>&gt;<br>&gt; Is there a way to get Pound to not mess with that header? I've looked
<br>&gt; at the source, and there doesn't appear to be any.<br>&gt;<br>&gt; Alternatively, one could get Pound to read the current X-Forwarded-<br>&gt; For header when it exists and use the same IP address in the X-<br>&gt; Forwarded-For header it itself adds, that should solve it, too. But
<br>&gt; again, I don't see a way to do that, either.<br>&gt;<br>&gt; I guess I'll just have to switch to Apache until lighty sorts out the<br>&gt; proxying.<br>&gt;<br>&gt; /Lars<br>&gt;<br>&gt; On Jul 8, 2006, at 6:20 PM, Jason A. Hoffman wrote:
<br>&gt;<br>&gt;&gt; On Jul 8, 2006, at 2:28 AM, Lars Pind wrote:<br>&gt;&gt;<br>&gt;&gt;&gt; Is anyone using the setup described at the Rails blog?<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; <a href="http://weblog.rubyonrails.org/2006/7/3/pound-makes-lighty-and-">
http://weblog.rubyonrails.org/2006/7/3/pound-makes-lighty-and-</a><br>&gt;&gt;&gt; mongrel-<br>&gt;&gt;&gt; play-nice<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; I'm using it in production, and the only problem I have is the same<br>
&gt;&gt;&gt; as people have described in the comments over there, namely that<br>&gt;&gt;&gt; Rails thinks all requests come from localhost.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; See <a href="http://isabont.com/requestinfo">http://isabont.com/requestinfo
</a> for the headers.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Any suggestions on what to try? Should I just replace lighty+pound<br>&gt;&gt;&gt; with Apache?<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; /Lars<br>&gt;&gt;<br>&gt;&gt; <a href="http://www.apsis.ch/pound">
http://www.apsis.ch/pound</a><br>&gt;&gt;<br>&gt;&gt; &quot;REQUEST LOGGING<br>&gt;&gt;<br>&gt;&gt; As a general rule, Pound passes all headers as they arrive from the<br>&gt;&gt; client browser to the back-end server(s). There are two exceptions to
<br>&gt;&gt; this rule: Pound may add information about the SSL client certificate<br>&gt;&gt; (as described below), and it will add an X-Forwarded-For header. The<br>&gt;&gt; general format is:<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X-Forwarded-for: client-IP-address
<br>&gt;&gt;<br>&gt;&gt; The back-end server(s) may use this extra information in order to<br>&gt;&gt; create their log-files with the real client address (otherwise all<br>&gt;&gt; requests will appear to originate from Pound itself, which is rather
<br>&gt;&gt; useless).&quot;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; - Jason<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; Mongrel-users mailing list<br>&gt;&gt; <a href="mailto:Mongrel-users@rubyforge.org">
Mongrel-users@rubyforge.org</a><br>&gt;&gt; <a href="http://rubyforge.org/mailman/listinfo/mongrel-users">http://rubyforge.org/mailman/listinfo/mongrel-users</a><br>&gt;<br>&gt; _______________________________________________
<br>&gt; Mongrel-users mailing list<br>&gt; <a href="mailto:Mongrel-users@rubyforge.org">Mongrel-users@rubyforge.org</a><br>&gt; <a href="http://rubyforge.org/mailman/listinfo/mongrel-users">http://rubyforge.org/mailman/listinfo/mongrel-users
</a><br><br>_______________________________________________<br>Mongrel-users mailing list<br><a href="mailto:Mongrel-users@rubyforge.org">Mongrel-users@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/mongrel-users">
http://rubyforge.org/mailman/listinfo/mongrel-users</a><br></blockquote></div><br>