From 7af0a6a22bb865f03bbdfef9434f8bee174589df Mon Sep 17 00:00:00 2001 From: yunwuxin <448901948@qq.com> Date: Thu, 2 Nov 2017 14:29:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BHOST=E7=9A=84=E8=8E=B7?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Request.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/think/Request.php b/library/think/Request.php index 5f05b916..9d215bb5 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -1342,6 +1342,9 @@ class Request */ public function host() { + if (isset($_SERVER['HTTP_X_REAL_HOST'])) { + return $_SERVER['HTTP_X_REAL_HOST']; + } return $this->server('HTTP_HOST'); }