I have some strange problem with easyadmin 3 on my web server. On my local machine everything works perfectly, but when I deployed the code to the web server, I am getting this error:
The signature of the URL is not valid.
In log file it looks like this:
request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: "The signature of the URL is not valid." at /var/www/myapp/vendor/easycorp/easyadmin-bundle/src/EventListener/AdminRouterSubscriber.php line 134 {"exception":"[object] (Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException(code: 0): The signature of the URL is not valid. at /var/www/myapp/vendor/easycorp/easyadmin-bundle/src/EventListener/AdminRouterSubscriber.php:134)"} []
If I debug the routes, the route /admin exist:
Name Method Scheme Host Path
app_admin_dashboard_index ANY ANY ANY /admin
Does somebody know what is the problem?
The problem is solved by adding this code to the DashboardController:
public function configureDashboard(): Dashboard
{
return Dashboard::new()
->disableUrlSignatures()
;
}