From: Teemu A. <in...@us...> - 2005-04-06 20:54:39
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6614 Modified Files: Request.pm Log Message: Implemented forwarded_for() which enables us to see remote hosts behind trusted proxies. Only tested with Apache.pm but the others should work in theory. A server configuration option could be added which when enabled, parses the first non-trusted IP address out of the forwarded_for() and places it directly as remote_host(). Index: Request.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Request.pm,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** Request.pm 24 Mar 2005 05:14:21 -0000 1.57 --- Request.pm 6 Apr 2005 20:54:30 -0000 1.58 *************** *** 26,30 **** now server_name remote_host user_agent referer cookie_header language_header ! url_absolute url_relative url_initial session auth_user auth_group auth_is_admin auth_is_logged_in ); --- 26,30 ---- now server_name remote_host user_agent referer cookie_header language_header ! url_absolute url_relative url_initial forwarded_for session auth_user auth_group auth_is_admin auth_is_logged_in ); *************** *** 808,811 **** --- 808,818 ---- Client IP address or hostname connecting to us. + B<forwarded_for> + + Comma separated list of IP addresses some proxies inbetween might + have forwarded the request for. If OpenInteract2 is behind truested proxies, + this is a good place to look for the real IP address instead of + the I<remote_host()> which includes the IP address of your proxy. + B<user_agent> |