BUGFIX: favicon.ico route for fixing invalid response

This commit is contained in:
Jeroen De Meerleer 2022-06-08 10:17:38 +02:00
parent 8789706743
commit a5c8087ea4
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
2 changed files with 11 additions and 0 deletions

View File

@ -14,6 +14,11 @@ health:
defaults:
_controller: App\Controller\SiteController::healthAction
favicon:
path: '/favicon.ico'
defaults:
_controller: App\Controller\SiteController::faviconAction
default_locale:
path: '/{_locale}'
defaults:

View File

@ -8,6 +8,7 @@ use Doctrine\Persistence\ManagerRegistry;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface;
class SiteController extends AbstractController
@ -26,4 +27,9 @@ class SiteController extends AbstractController
];
return new JsonResponse($return, $return['DaemonRunning'] ? 200 : 500);
}
public function faviconAction(Request $request)
{
return new Response('', 200);
}
}