������������!
sub My::ProxyRemoteAddr ($) {
my $r = shift;
# we'll only look at the X-Forwarded-For header if the requests
# comes from our proxy at localhost
return OK unless ($r->connection->remote_ip eq "127.0.0.1");
# Select last value in the chain -- original client's ip
if (my ($ip) = $r->headers_in->{'X-Forwarded-For'} =~ /([^,\s]+)$/) {
$r->connection->remote_ip($ip);
}
return OK;
}
And in httpd.conf:
PerlPostReadRequestHandler My::ProxyRemoteAddr
� ���������,
������ �������
----- Original Message -----
From: "Denis Bakhtin" <[EMAIL PROTECTED]>
To: ". oops, list" <[EMAIL PROTECTED]>
Sent: Thursday, October 26, 2000 11:17 PM
Subject: [OOPS] REMOTE_ADDR=HTTP_X_FORWARDED_FOR ?
> ������������.
>
> ������ � ���, ��� ������ ����� apache � oops, ���������� ���� ��
> ������.
>
> ��� ��������, �����:
> REMOTE_ADDR=HTTP_X_FORWARDED_FOR
>
> � �� � ����:
> REMOTE_ADDR=SERVER_ADDR
> � �������������� access.log apache �������� ������ SERVER_ADDR (��
> ���������).
>
> �����, ��� ������� � squid �� oops �������, �� ���.
>
> � ���������,
> ����� ������
>
> =====================================================================
> If you would like to unsubscribe from this list send message to
> [EMAIL PROTECTED] with "unsubscribe oops" in message body.
> Archive is accessible on http://www.paco.net/oops/
>
=====================================================================
If you would like to unsubscribe from this list send message to
[EMAIL PROTECTED] with "unsubscribe oops" in message body.
Archive is accessible on http://www.paco.net/oops/