Commit 6dd78c8a authored by 杨培's avatar 杨培

支持 remoteIp 定义远程 IP 地址省去解析过程

parent 7c7a077e
......@@ -150,7 +150,7 @@ class Client
if ($this->remoteIp) {
$host = parse_url($url, PHP_URL_HOST);
$url = substr_replace($url, $this->remoteIp, strpos($url, $host), strlen($host));
//$url = preg_replace('/^(https?:\/\/)[\w\-\.]+?(\/.*)/i', '${1}'.$this->remoteIp.'$2', $url, 1);
//$url = preg_replace('/^(https?:\/\/)[^\/]+/i', '${1}'.$this->remoteIp, $url, 1);
$headers[] = "Host: $host";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment