mirror of
https://github.com/rekryt/iplist.git
synced 2025-10-13 00:49:36 +03:00
feat: new frontend
This commit is contained in:
@@ -10,6 +10,7 @@ use Amp\Http\Server\Response;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Throwable;
|
||||
|
||||
use function OpenCCK\dbg;
|
||||
use function OpenCCK\getEnv;
|
||||
|
||||
final class HTTPHandler extends Handler implements HTTPHandlerInterface {
|
||||
|
@@ -98,7 +98,9 @@ final class Server implements AppModuleInterface {
|
||||
// $this->bindContext
|
||||
//);
|
||||
$router = new Router($this->httpServer, $this->logger, $this->errorHandler);
|
||||
$router->addRoute('GET', '/', HTTPHandler::getInstance($this->logger)->getHandler());
|
||||
$httpHandler = HTTPHandler::getInstance($this->logger)->getHandler();
|
||||
$router->addRoute('GET', '/', $httpHandler);
|
||||
$router->addRoute('GET', '/{name:.+}', $httpHandler);
|
||||
$router->setFallback(new DocumentRoot($this->httpServer, $this->errorHandler, PATH_ROOT . '/public'));
|
||||
|
||||
$this->httpServer->start($router, $this->errorHandler);
|
||||
|
Reference in New Issue
Block a user