For the first change you've made, you can use the AddHeader directive.

In your non-SSL listener, add:
AddHeader "X-Forwarded-Proto: http"

In your SSL listener, add:
AddHeader "X-Forwarded-Proto: https"

As for the X-Forwarded-For header, Pound merely adds its header to the end, for 
instance:
Incoming Request (before pound):
GET / HTTP/1.0
X-Forwarded-For: 123.234.234.234

Request passed to backend:
GET / HTTP/1.0
X-Forwarded-For: 123.234.234.234
X-Forwarded-For: 127.0.0.1

(yes, I was telnetting to/from localhost)


With application servers I've used in the past, some will append that duplicate 
header together so you'll end up with the comma separated list you're creating 
on your own.  Others might return the header as an array, or expose the header 
text for you to parse yourself.  Basically my point is, it's in there already.

Unless you specify the HeadRemove directive, it'll pass those request headers 
through.

Joe


> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> Sent: Thursday, November 17, 2011 6:37 PM
> To: [email protected]
> Subject: [Pound Mailing List] Just started using pound (and sending
> patches)
> 
> I've just finished testing pound and will probably have it
> in production in a couple weeks.  I'm happy with it so far.
> 
> For it to work in our environment I had to patch it to do
> two things
>   * send the X-Forwarded-Proto header
>   * relay the X-Forwarded-For header if present
> http://www.intarnat.org/pound/p1/http.c.patch
> http://www.intarnat.org/pound/p1/pound.h.patch
> http://www.intarnat.org/pound/p1/svc.c.patch
> (all against 2.5, since that's what we're running)
> 
> The first is to push some pages to SSL if they don't
> come in using SSL (since we're offloading that to
> Pound).
> 
> The second because we're running in the AWS cloud and
> using their dysfunctional load balancer to handle HA
> between pound instances and we want to get the real
> client IP and not amazon's ELB IP.
> 
> 
>   alex
> 
> 
> --
> To unsubscribe send an email with subject unsubscribe to
> [email protected].
> Please contact [email protected] for questions.

--
To unsubscribe send an email with subject unsubscribe to [email protected].
Please contact [email protected] for questions.

Reply via email to