Kbase P144147: Is there a way to retrieve X_FORWARDED_FOR from WebSpeed?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  05/04/2009 |
|
Status: Unverified
GOAL:
Is there a way to retrieve X_FORWARDED_FOR from WebSpeed?
GOAL:
How to retrieve X_FORWARDED_FOR from WebSpeed?
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.x
OpenEdge 10.x
FIX:
The X-Forwarded-For (XFF) HTTP header is a de facto standard for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or load balancer. This is a non-RFC-standard request header which was introduced by the Squid caching proxy server's developers.
In order for WebSpeed to be able to retrieve X-Forwarded-For as a CGI environment, following conditions have to be met:
1. The browser client making the request will send in X-forwarded-for as part of request header
2. The web server getting the request needs to map the request header to a CGI environment variable. For example, to see what is
getting mapped, you can run following perl script to see a list of mapped variables from web server
#!/usr/perl5/bin/perl
##
## printenv -- demo CGI program which just prints its environment
##
print "Content-type: text/plain\n\n";
foreach $var (sort(keys(%ENV))) {
$val = $ENV{$var};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;
print "${var}=\"${val}\"\n";
}
If the mapped environment, for example, HTTP_X_FORWARDED_FOR, is among the list of CGI environment, WebSpeed can retrieve it. If not, then WebSpeed cgiip messenger can not get it as it is not passed from web server.