This commit is contained in:
xl
2023-06-12 17:24:46 +08:00
parent 398b306199
commit a75690d91c
2 changed files with 3 additions and 3 deletions
-3
View File
@@ -148,9 +148,6 @@ class Uri implements UriInterface
public function getPath(): string public function getPath(): string
{ {
// TODO: Implement getPath() method. // TODO: Implement getPath() method.
if ($this->path === 'OPTIONS') {
$this->path = '/*';
}
return $this->path; return $this->path;
} }
+3
View File
@@ -215,6 +215,9 @@ class RouterCollector implements \ArrayAccess, \IteratorAggregate
if (!$this->methods->has($method)) { if (!$this->methods->has($method)) {
return $this->default->get('handler'); return $this->default->get('handler');
} }
if ($method === 'OPTIONS') {
$path = '/*';
}
$parent = $this->methods->get($method); $parent = $this->methods->get($method);
/** @var HashMap $parent */ /** @var HashMap $parent */