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