我有一个配置了注释的Symfony Route,我希望最后一个参数允许在其中使用斜杠。
#[Route('/getFtp/{customerName}/{taskId}/{domainName}', name: 'get_ftp', requirements: ['domainName' => '.+'])] public function index(string $customerName, string $taskId, string $domainName): Response
根据文件https://symfony.com/doc/6.0/routing.html#slash-路由参数中的字符,这应该有效。
它适用于
http://mgr2.example.com/getFtp/quadramedia/abcdef/http:
但不适用于
http://mgr2.example.com/getFtp/quadramedia/abcdef/http:%2F