Skip to content

Commit 92bba67

Browse files
committed
开启强制路由的不再检查路由地址直接访问
1 parent 2b8459b commit 92bba67

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/think/route/RuleGroup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public function check(Request $request, string $url, bool $completeMatch = false
202202
protected function checkUrl(string $url): bool
203203
{
204204
$url = str_replace('|', '/', $url);
205-
if ($this->router->getRuleName()->getName($url)) {
205+
if (!$this->config('url_route_must') && $this->router->getRuleName()->getName($url)) {
206206
// 定义过路由地址的 不支持访问
207207
return false;
208208
}

0 commit comments

Comments
 (0)