eee
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||||||
namespace Kiri\Router\Base;
|
namespace Kiri\Router\Base;
|
||||||
|
|
||||||
|
|
||||||
|
use Kiri\Di\Context;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
class NotFoundController extends Controller
|
class NotFoundController extends Controller
|
||||||
@@ -15,10 +16,12 @@ class NotFoundController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function fail(): ResponseInterface
|
public function fail(): ResponseInterface
|
||||||
{
|
{
|
||||||
|
$response = Context::get(ResponseInterface::class);
|
||||||
if ($this->request->getMethod() == 'OPTIONS') {
|
if ($this->request->getMethod() == 'OPTIONS') {
|
||||||
return \response()->withStatus(200, "");
|
return $response->withStatus(200, "");
|
||||||
|
} else {
|
||||||
|
return $response->withStatus(404, "not found page.");
|
||||||
}
|
}
|
||||||
return \response()->withStatus(404, "not found page.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user