|
/
Zope
/
Apsis
/
Pound Mailing List
/
Archive
/
2006
/
2006-04
/
How to add a http header?
[
Error 500 when using pound and apache VirtualHost ... ]
[
Choice of syslog facility for 2.0.4 / Will Tatam ... ]
How to add a http header?
Hu Hailin <hu.hailin(at)adways.net> |
2006-04-28 04:26:02 |
[ SNIP ]
|
Hi,
I need to add a http header for my application.
But according to the man page, it seems only HTTPS Listener can manage
the stuff. Even though, it can only add static content for headers.
My situation is:
My backends rewrite urls according the request base url. Since I use
Pound as the frontend. The "HTTP-HOST" becomes meaningless. And the backends
support "X-Forwarded-Host".
So, how can I setup Pound, or I have to hack my backend?
|
|
|
Re: [Pound Mailing List] How to add a http header?
Robert Segall <roseg(at)apsis.ch> |
2006-04-29 10:50:40 |
[ SNIP ]
|
On Fri, 2006-04-28 at 10:26 +0800, Hu Hailin wrote:
> Hi,
>
> I need to add a http header for my application.
> But according to the man page, it seems only HTTPS Listener can manage
> the stuff. Even though, it can only add static content for headers.
>
> My situation is:
> My backends rewrite urls according the request base url. Since I use
> Pound as the frontend. The "HTTP-HOST" becomes meaningless. And the backends
> support "X-Forwarded-Host".
>
> So, how can I setup Pound, or I have to hack my backend?
I am rather confused: the request URL is passed through to the back-ends
unchanged, so it can be used exactly as without Pound. Perhaps you'd
like to explain again what the problem is?
As to the other things you seem to be asking:
- a header is added only for HTTPS because of the change in protocol.
This allows certain back-ends (such as OWA) to adjust their responses
accordingly.
- Pound uses X-Forwarded-for to tell the back-end the client's
originating address. You could use that if you want, though it is far
from reliable, can be easily faked, and may appear multiple times (once
for each proxy along the way).
Hope this helps some...
--
Robert Segall
Apsis GmbH
Postfach, Uetikon am See, CH-8707
Tel: +41-44-920 4904
|
|
|
Re: [Pound Mailing List] How to add a http header?
Hu Hailin <hu.hailin(at)adways.net> |
2006-04-29 13:09:59 |
[ SNIP ]
|
Thank you for your reply.
I tested once more. It seems Pound has already added X-Forwarded-for and
X-Forwarded-Host
headers. But it is not mentioned in the doc that Pound will add headers
for HTTP. Am I missed something?
Anyway, it works now.
On Sat, 29 Apr 2006 10:50:40 +0200
Robert Segall <roseg(at)apsis.ch> wrote:
>
> I am rather confused: the request URL is passed through to the back-ends
> unchanged, so it can be used exactly as without Pound. Perhaps you'd
> like to explain again what the problem is?
>
> As to the other things you seem to be asking:
>
> - a header is added only for HTTPS because of the change in protocol.
> This allows certain back-ends (such as OWA) to adjust their responses
> accordingly.
>
> - Pound uses X-Forwarded-for to tell the back-end the client's
> originating address. You could use that if you want, though it is far
> from reliable, can be easily faked, and may appear multiple times (once
> for each proxy along the way).
>
> Hope this helps some...
> --
> Robert Segall
> Apsis GmbH
> Postfach, Uetikon am See, CH-8707
> Tel: +41-44-920 4904
>
>
> --
> To unsubscribe send an email with subject 'unsubscribe' to pound(at)apsis.ch.
> Please contact roseg(at)apsis.ch for questions.
>
http://www.apsis.ch/pound/pound_list/archive/2006/2006-04/1146191162000/1146300640000
>
$B!=!=!=(B $B3t<02q<R%"%I%&%'%$%:(B
$B!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=(B
$BEl5~K\<R!!!!!!")(B110-0015 $BEl5~ETBfEl6hEl>eLn(B6-9-3
$B=;M'ITF0;:(B $B>eLn%S%k(B8$B9f4[(B 5F
$B!!!!!!!!!!!!(B TEL 03-5830-1560 FAX 03-5830-1561
$B3+H/%;%s%?!<(B $B0&FA0RFp7o3+H/(B($B>e3$(B)$BM-8B8x;J(B
200001 $B>e3$;T9-ElO)(B689$B9f3$DL>Z7tBgRO(B2810$B<<(B
TEL +86-21-6341-0128 $B!!!!(B FAX +86-21-6341-0208
$B!!%S%8%M%9%G%Y%m%C%W%a%s%H%0%k!<%W(B
$B!!%a%G%#%"%A!<%`(B
$B!!%7%9%F%`%f%K%C%H(B
$B!!8U!!3$N[!!(Bko.kairin(at)adways.net
$B!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=(B http://www.adways.net
$B!=!=!=!=!=(B
|
|
|
Re: [Pound Mailing List] How to add a http header?
Rune Saetre <rune.saetre(at)netcom-gsm.no> |
2006-04-29 15:46:12 |
[ SNIP ]
|
Hi
In Pound-1.10 have the line
HeadRemove "X-Forwarded-For"
in my config files. The X-Forwarded-For added by pound is then the only
X-Forwarded-For header in the request coming out of pound.
Pound-1.10 at least uses the inet_ntoa() function to convert the IP
address to text, and the manpage for inet_ntoa states:
The inet_ntoa() function converts the Internet host address in given in
network byte order to a string in standard numbers-and-dots notation.
The string is returned in a statically allocated buffer, which subse-
quent calls will overwrite.
This means you should be careful in using this for authentication
purposes, but it is ok for logging. There was a thread on the mailing list
about this:
http://www.apsis.ch/pound/pound_list/archive/2004/2004-10/1096989160000
I do not know if Pound-2.x uses the safer inet_ntop() now.
Regards
Rune
---
Rune Sætre <rune.saetre(at)netcom-gsm.no>
NetCom as
..
On Sat, 29 Apr 2006, Robert Segall wrote:
> On Fri, 2006-04-28 at 10:26 +0800, Hu Hailin wrote:
>> Hi,
>>
>> I need to add a http header for my application.
>> But according to the man page, it seems only HTTPS Listener can manage
>> the stuff. Even though, it can only add static content for headers.
>>
>> My situation is:
>> My backends rewrite urls according the request base url. Since I use
>> Pound as the frontend. The "HTTP-HOST" becomes meaningless. And the backends
>> support "X-Forwarded-Host".
>>
>> So, how can I setup Pound, or I have to hack my backend?
>
> I am rather confused: the request URL is passed through to the back-ends
> unchanged, so it can be used exactly as without Pound. Perhaps you'd
> like to explain again what the problem is?
>
> As to the other things you seem to be asking:
>
> - a header is added only for HTTPS because of the change in protocol.
> This allows certain back-ends (such as OWA) to adjust their responses
> accordingly.
>
> - Pound uses X-Forwarded-for to tell the back-end the client's
> originating address. You could use that if you want, though it is far
> from reliable, can be easily faked, and may appear multiple times (once
> for each proxy along the way).
>
> Hope this helps some...
> --
> Robert Segall
> Apsis GmbH
> Postfach, Uetikon am See, CH-8707
> Tel: +41-44-920 4904
>
>
> --
> To unsubscribe send an email with subject 'unsubscribe' to pound(at)apsis.ch.
> Please contact roseg(at)apsis.ch for questions.
>
http://www.apsis.ch/pound/pound_list/archive/2006/2006-04/1146191162000/1146300640000
>
|
|
|
|