-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
SecurityhasPRA Pull Request has already been submitted for this issue.A Pull Request has already been submitted for this issue.⭐️ EU-FOSSA Hackathonhttps://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-cominghttps://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-coming
Milestone
Description
The following pages explain how the firewall works:
- https://symfony.com/doc/master/security/access_control.html
- https://symfony.com/doc/master/security.html#securing-url-patterns-access-control
- https://symfony.com/doc/master/best_practices/security.html
They never explain that we can use a regular expression.
For example, we use this configuration in on of our projects and it works:
- { path: ^/api/(entity1|entity2)/\d+$, methods: ['GET'], roles: ROLE_USER }
It matches /api/entity1/528491
and /api/entity2/528491
.
I think that the documentation should explain that we can use regular expression in path
.
kunicmarko20, OskarStark, royklutman, PReimers and j4r3kb
Metadata
Metadata
Assignees
Labels
SecurityhasPRA Pull Request has already been submitted for this issue.A Pull Request has already been submitted for this issue.⭐️ EU-FOSSA Hackathonhttps://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-cominghttps://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-coming