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

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
# Vendored / third-party libraries
public/js/tus.js linguist-vendored

View File

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

View File

@@ -37,9 +37,16 @@ final class AuthMiddleware implements MiddlewareInterface
RequestHandlerInterface $handler RequestHandlerInterface $handler
): ResponseInterface ): ResponseInterface
{ {
$this->logger->debug('getClientIp: ' . getClientIp()); $clientIp = getClientIp();
$path = $request->getUri()->getPath(); $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; $token = $request->getCookieParams()['auth_token'] ?? null;
$session = null; $session = null;