X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fprovider_proxy.phh;h=57d98522f9c8b3352f1c4e0c14a9511b731dc97f;hb=db5d6355c39327ba7f8052f360f1e846ba4ad01c;hp=eb4b12e933eb704b2b8f0b14bee4d6a8e042afbe;hpb=28be75bdd1253bb56c8bef5476f59be63013eb71;p=brisk.git diff --git a/web/Obj/provider_proxy.phh b/web/Obj/provider_proxy.phh index eb4b12e..57d9852 100644 --- a/web/Obj/provider_proxy.phh +++ b/web/Obj/provider_proxy.phh @@ -80,14 +80,18 @@ class ProviderProxy } } - function realip($header, $ip) + function realip(&$header, $ip) { + // fprintf(STDERR, "PP realip: [%d]\n", count($this->pp)); if ($this->pp != NULL) { foreach ($this->pp as $pp_name => $pp_item) { + // fprintf(STDERR, "PP loop: [%s][%s]\n", $pp_name, $ip); if ($pp_item->ipclass->check($ip)) { if (isset($header[$pp_item->headitem])) { - fprintf(STDERR, "Match public proxy [%s][%s]\n", $pp_name, $header[$pp_item->headitem]); - return ($header[$pp_item->headitem]); + fprintf(STDERR, "PP: match public proxy [%s][%s]\n", $pp_name, $header[$pp_item->headitem]); + $ret = $header['POST_'.$pp_item->headitem] = $header[$pp_item->headitem]; + unset($header[$pp_item->headitem]); + return ($ret); } } } @@ -96,4 +100,4 @@ class ProviderProxy } } -?> \ No newline at end of file +?>