Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | public function check(Request $request, string $url, bool $completeMatch = false) |
||
33 | { |
||
34 | if ($request->method() == 'OPTIONS') { |
||
35 | // 自动响应options请求 |
||
36 | return new Callback($request, $this->parent, function () { |
||
37 | return Response::create('', 'html', 204)->header(['Allow' => 'GET, POST, PUT, DELETE']); |
||
38 | }); |
||
39 | } |
||
40 | |||
41 | return $this->checkRule($request, $url, null, $completeMatch); |
||
42 | } |
||
45 |