Brad,
Make sure the forwarded_for option is enabled in squid.conf (by default it
is). Then have your CGI script look at X-Forwarded-For from the HTTP
header. It will contain the IP address of the remote client. In the absence
of a X-Forwarded-For field you would assume the request did not come via a
proxy and use the Remote_Addr field instead.
Regards,
Simon.
>Problem I'm having is:
>On a couple of our Sun Web servers (apache) we have some cgi programs that
>rely on the REMOTE_ADDR field to contain the ip address of the customer
>that is running the CGI (used for identifying local customers in data-base).
>Anyway with Squid running the REMOTE_ADDR as far as the cgi program is
>concerned is the ip address of the squid server, instead of the ip address
>of the dialed-in customer.
>
>I've run through the squid.conf file and tried a couple possibilities, but
>basically struck out.
>
>There might be a couple ways to skin this cat, but basically I guess I'm
>looking to allow requests to pass right through squid if they are accessing
>particular cgi programs or maybe even all cgi's hosted under a certain
domain.
>
Received on Wed Jun 23 1999 - 01:47:27 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:46:57 MST