Skip to content

Explain format of paths in security.access_control #10964

Closed
@alexislefebvre

Description

@alexislefebvre

The following pages explain how the firewall works:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    SecurityhasPRA Pull Request has already been submitted for this issue.⭐️ EU-FOSSA Hackathonhttps://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-coming

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions