This commit is contained in:
2023-08-25 11:04:47 +08:00
parent 9558a44f5a
commit 6c90006150
+3
View File
@@ -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;
}