From 6c90006150477590eabccf1ba9b2df42709464f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 25 Aug 2023 11:04:47 +0800 Subject: [PATCH] qqq --- src/RouterCollector.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/RouterCollector.php b/src/RouterCollector.php index d3abc09..d9bebaa 100644 --- a/src/RouterCollector.php +++ b/src/RouterCollector.php @@ -204,6 +204,9 @@ class RouterCollector implements \ArrayAccess, \IteratorAggregate */ public function query(string $path, string $method): Handler { + if ($method === 'OPTIONS') { + $path = '/*'; + } return $this->methods[$method . '_' . $path] ?? $this->found; }