mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进路由的ext和deny_ext参数 允许设置为空 表示不允许任何后缀或者必须使用后缀访问
This commit is contained in:
@@ -1126,8 +1126,8 @@ class Route
|
||||
|| (isset($option['ajax']) && !$option['ajax'] && $request->isAjax()) // 非Ajax检测
|
||||
|| (isset($option['pjax']) && $option['pjax'] && !$request->isPjax()) // Pjax检测
|
||||
|| (isset($option['pjax']) && !$option['pjax'] && $request->isPjax()) // 非Pjax检测
|
||||
|| (isset($option['ext']) && false === stripos('|' . $option['ext'] . '|', $request->ext() ? '|' . $request->ext() . '|' : '')) // 伪静态后缀检测
|
||||
|| (isset($option['deny_ext']) && false !== stripos('|' . $option['deny_ext'] . '|', $request->ext() ? '|' . $request->ext() . '|' : ''))
|
||||
|| (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])) // 域名检测
|
||||
|| (isset($option['https']) && $option['https'] && !$request->isSsl()) // https检测
|
||||
|| (isset($option['https']) && !$option['https'] && $request->isSsl()) // https检测
|
||||
|
||||
Reference in New Issue
Block a user