feat: update allowed frontend hosts and add clinic-pro.ir domain

This commit is contained in:
hamed
2026-07-21 16:51:42 +03:30
parent 512dbdaba0
commit 7e847b62c4
14 changed files with 207 additions and 25 deletions
+11 -4
View File
@@ -3,16 +3,23 @@
namespace App\Shared\Controller;
use Doctrine\ORM\EntityManagerInterface;
use Psr\Cache\CacheItemPoolInterface;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\NullLogger;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Contracts\Cache\CacheInterface;
class HealthController
{
public function __construct(
private readonly EntityManagerInterface $em,
private readonly CacheInterface $cache,
) {}
private readonly CacheItemPoolInterface $healthPool,
) {
// probe سلامت نباید هنگام افتادن redis لاگ warning تولید کند؛ logger این pool را خنثی می‌کنیم.
if ($this->healthPool instanceof LoggerAwareInterface) {
$this->healthPool->setLogger(new NullLogger());
}
}
#[Route('/health', methods: ['GET'])]
public function __invoke(): JsonResponse
@@ -29,7 +36,7 @@ class HealthController
}
try {
$item = $this->cache->getItem('health_check');
$this->healthPool->getItem('health_check');
$checks['redis'] = 'ok';
} catch (\Throwable) {
$checks['redis'] = 'error';
-12
View File
@@ -1,12 +0,0 @@
<?php
namespace App\Shared\Message;
class SendSmsMessage
{
public function __construct(
public readonly string $mobile,
public readonly string $message,
public readonly ?int $smsLogId = null,
) {}
}