From aca32d1da34ddef7ad3c423c3dc46c77115e7157 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 23 Oct 2016 23:40:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E6=9D=A1=E4=BB=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0ajax=E5=92=8Cpjax?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base.php | 2 +- library/think/Route.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/base.php b/base.php index 1184dc51..b668120e 100644 --- a/base.php +++ b/base.php @@ -9,7 +9,7 @@ // | Author: liu21st // +---------------------------------------------------------------------- -define('THINK_VERSION', '5.0.2dev'); +define('THINK_VERSION', '5.0.2'); define('THINK_START_TIME', microtime(true)); define('THINK_START_MEM', memory_get_usage()); define('EXT', '.php'); diff --git a/library/think/Route.php b/library/think/Route.php index ca98d88f..2db507ed 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -1093,7 +1093,9 @@ class Route { // 请求类型检测 if ((isset($option['method']) && is_string($option['method']) && false === stripos($option['method'], $request->method())) - || (isset($option['ext']) && false === stripos($option['ext'], $request->ext())) // 伪静态后缀检测 + || (!empty($option['ajax']) && !$request->isAjax()) // Ajax检测 + || (!empty($option['pjax']) && !$request->isPjax()) // Pjax检测 + || (isset($option['ext']) && false === stripos($option['ext'], $request->ext())) // 伪静态后缀检测 || (isset($option['deny_ext']) && false !== stripos($option['deny_ext'], $request->ext())) || (isset($option['domain']) && !in_array($option['domain'], [$_SERVER['HTTP_HOST'], self::$subDomain])) // 域名检测 || (!empty($option['https']) && !$request->isSsl()) // https检测