Symfony 2.2 introduced host support in the routing system. Symfony 2.4 does the same for the security firewall configuration.
When configuring a firewall, you can restrict it to a given URL path pattern,
like ^/admin/
:
1 2 3
admin:
pattern: ^/admin
http_basic: true
But what if you want to restrict it to admin.example.com
instead? As of
Symfony 2.4, this is really easy:
1 2 3 4
host:
pattern: ^/
host: admin\.example\.com
http_basic: true
Simple and powerful!
+1 very nice feature. Especcialy for an api.example.com url a missed feature.
Finally! Good job! : )
Argh, I was too late, also wanted to make this PR! :)