Details
-
Improvement
-
Resolution: Fixed
-
Medium
-
None
-
None
Description
Ibexa router class Ibexa\Bundle\Core\Routing\DefaultRouter overrides the matchRequest method to enable matching on semantic path info by calling the match method.
This effectively disables all request based condition checking in route definitions.
For example, the following route match will not work:
app_test:
path: /test
controller: App\Controller\Test
condition: "request.headers.get('X-Custom') === 'Foo'"
because at the point of the match, the headers do not exist in the request. At this point, the request is a dummy object created by Symfony based only on the request path (due to calling the match method in Ibexa\Bundle\Core\Routing\DefaultRouter::matchRequest)