Quote:
Originally posted by Jawelin
Just an addendum: I noticed often I had better results with the HTTP_FORWARDED env var instead of HTTP_X_FORWARDED_FOR you used. I mean, first was filled, the second one no...
|
Ah, I actually wasnt aware of that, but its easyily correctable by replacing:
PHP Code:
if (getenv("HTTP_X_FORWARDED_FOR")!="") {
$proxyip=getenv("HTTP_X_FORWARDED_FOR");
} else {
$proxyip="";
}
with
PHP Code:
if (getenv("HTTP_X_FORWARDED_FOR")!="") {
$proxyip=getenv("HTTP_X_FORWARDED_FOR");
} else {
if (getenv("HTTP_FORWARDED")!="") {
$proxyip=getenv("HTTP_FORWARDED");
}
$proxyip="";
}
I've updated the install file and tested it, works fine. Thanks ^^ :bunny:
(btw, is there an easyer way to do the second check? not quite sure, elseif didnt seem to fit the bill)