Skip to content

Commit

Permalink
改进路由ext参数检测 首页不检测
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Jan 18, 2018
1 parent fc106af commit a81bc1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/think/route/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -800,8 +800,8 @@ protected function checkOption($option, Request $request)
}

// 伪静态后缀检测
if ((isset($option['ext']) && false === stripos('|' . $option['ext'] . '|', '|' . $request->ext() . '|'))
|| (isset($option['deny_ext']) && false !== stripos('|' . $option['deny_ext'] . '|', '|' . $request->ext() . '|'))) {
if ($request->url() != '/' && ((isset($option['ext']) && false === stripos('|' . $option['ext'] . '|', '|' . $request->ext() . '|'))
|| (isset($option['deny_ext']) && false !== stripos('|' . $option['deny_ext'] . '|', '|' . $request->ext() . '|')))) {
return false;
}

Expand Down

0 comments on commit a81bc1b

Please sign in to comment.