fix healthckeck logging

This commit is contained in:
2026-01-15 05:12:34 +07:00
parent f99092bee8
commit 85afe2badc
3 changed files with 11 additions and 3 deletions

View File

@@ -22,7 +22,6 @@ final readonly class AuthController
public function loginForm(): string
{
$this->logger->info("Login form started");
$error = $_SESSION['login_error'] ?? null;
unset($_SESSION['login_error']);

View File

@@ -37,9 +37,16 @@ final class AuthMiddleware implements MiddlewareInterface
RequestHandlerInterface $handler
): ResponseInterface
{
$this->logger->debug('getClientIp: ' . getClientIp());
$clientIp = getClientIp();
$path = $request->getUri()->getPath();
$method = $request->getMethod();
if ($clientIp !== '::1') { //todo trusted proxy
$this->logger->debug(
sprintf('Request: %s %s from IP: %s', $method, $path, $clientIp)
);
}
$token = $request->getCookieParams()['auth_token'] ?? null;
$session = null;