Created
July 8, 2013 14:01
-
-
Save xphere/5949027 to your computer and use it in GitHub Desktop.
Demonstrates how order matters in firewall setup #Symfony #Security
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # With this security.yml, browsing to /api resolves to root firewall | |
| security: | |
| # ... | |
| firewalls: | |
| root: | |
| pattern: ^/ | |
| anonymous: true | |
| api: | |
| pattern: ^/api | |
| http_basic: ~ | |
| # With this one, same route resolves to the api one | |
| security: | |
| # ... | |
| firewalls: | |
| api: | |
| pattern: ^/api | |
| http_basic: ~ | |
| root: | |
| pattern: ^/ | |
| anonymous: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment