Feature: #93455 - Backend Routes restricted to specified HTTP methods¶
Individual Backend Routes in TYPO3 Backend can now be configured to only apply for specific HTTP methods (e.g. GET or POST).
This way, custom Backend routes can be limited to only allow submitted form content to be delivered via HTTP POST for example.
The underlying symfony routing component, which is already used in TYPO3 Backend for routing through the proper API, is handling the restriction to the HTTP method / verb automatically.
Any Backend route, configured in extensions via
has a new, optional property
methods, which expects an array
to set one or more HTTP verbs, such as
If no property is given, no restriction to a HTTP method is set.
return [ 'my_route' => [ 'path' => '/benni/my-route', 'methods' => ['POST'], 'target' => MyVendor\MyPackage\Controller\MyRouteController::class . '::submitAction' ] ];