@@ -5,25 +5,25 @@ How to Restrict Firewalls to a Specific Request
55===============================================
66
77When using the Security component, you can create firewalls that match certain request options.
8- In most cases, matching against the URL is sufficient, but in special cases you can further
8+ In most cases, matching against the URL is sufficient, but in special cases you can further
99restrict the initialization of a firewall against other options of the request.
1010
1111.. note ::
1212
13- You can use any of these restrictions individually or mix them together to get
14- your desired firewall configuration.
13+ You can use any of these restrictions individually or mix them together to get
14+ your desired firewall configuration.
1515
1616Restricting by Pattern
1717----------------------
1818
19- This is the default restriction and restricts a firewall to only be initialized if the request URL
20- matches the configured ``pattern ``.
19+ This is the default restriction and restricts a firewall to only be initialized if the request URL
20+ matches the configured ``pattern ``.
2121
2222.. configuration-block ::
2323
2424 .. code-block :: yaml
2525
26- # app/ config/security.yml
26+ # config/packages/ security.yaml
2727
2828 # ...
2929 security :
@@ -64,23 +64,23 @@ matches the configured ``pattern``.
6464 ),
6565 ));
6666
67- The ``pattern `` is a regular expression. In this example, the firewall will only be
67+ The ``pattern `` is a regular expression. In this example, the firewall will only be
6868activated if the URL starts (due to the ``^ `` regex character) with ``/admin ``. If
69- the URL does not match this pattern, the firewall will not be activated and subsequent
69+ the URL does not match this pattern, the firewall will not be activated and subsequent
7070firewalls will have the opportunity to be matched for this request.
7171
7272Restricting by Host
7373-------------------
7474
75- If matching against the ``pattern `` only is not enough, the request can also be matched against
76- ``host ``. When the configuration option ``host `` is set, the firewall will be restricted to
75+ If matching against the ``pattern `` only is not enough, the request can also be matched against
76+ ``host ``. When the configuration option ``host `` is set, the firewall will be restricted to
7777only initialize if the host from the request matches against the configuration.
7878
7979.. configuration-block ::
8080
8181 .. code-block :: yaml
8282
83- # app/ config/security.yml
83+ # config/packages/ security.yaml
8484
8585 # ...
8686 security :
@@ -138,7 +138,7 @@ the provided HTTP methods.
138138
139139 .. code-block :: yaml
140140
141- # app/ config/security.yml
141+ # config/packages/ security.yaml
142142
143143 # ...
144144 security :
0 commit comments