fix healthckeck logging
This commit is contained in:
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Vendored / third-party libraries
|
||||||
|
public/js/tus.js linguist-vendored
|
||||||
@@ -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']);
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user