reduced log
[brisk.git] / web / Obj / provider_proxy.phh
index b1a4d95..57d9852 100644 (file)
@@ -80,16 +80,18 @@ class ProviderProxy
         }
     }
 
-    function realip($header, $ip)
+    function realip(&$header, $ip)
     {
-        fprintf(STDERR, "PP realip: [%d]\n", count($this->pp));
+        // 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, "PP: match public proxy [%s][%s]\n", $pp_name, $header[$pp_item->headitem]);
-                        return ($header[$pp_item->headitem]);
+                        $ret = $header['POST_'.$pp_item->headitem] = $header[$pp_item->headitem];
+                        unset($header[$pp_item->headitem]);
+                        return ($ret);
                     }
                 }
             }
@@ -98,4 +100,4 @@ class ProviderProxy
     }
 }
 
-?>
\ No newline at end of file
+?>