This commit is contained in:
thinkphp
2017-11-02 15:42:33 +08:00

View File

@@ -1342,6 +1342,9 @@ class Request
*/ */
public function host() public function host()
{ {
if (isset($_SERVER['HTTP_X_REAL_HOST'])) {
return $_SERVER['HTTP_X_REAL_HOST'];
}
return $this->server('HTTP_HOST'); return $this->server('HTTP_HOST');
} }