4
4
How to Restrict Firewalls to a Specific Request
5
5
===============================================
6
6
7
- When using the Security component, firewalls will decide whether they handle a request based on the
8
- result of a request matcher: the first firewall matching the request will handle it.
7
+ When using the Security component, firewalls will decide whether they handle a
8
+ request based on the result of a request matcher: the first firewall matching
9
+ the request will handle it.
9
10
10
- The last firewall can be configured without any matcher to handle every incoming request.
11
+ The last firewall can be configured without any matcher to handle every incoming
12
+ request.
11
13
12
14
Restricting by Configuration
13
15
----------------------------
14
16
15
- Most of the time you don't need to create matchers yourself as Symfony can do it for you based on the
16
- firewall configuration.
17
+ Most of the time you don't need to create matchers yourself as Symfony can do it
18
+ for you based on the firewall configuration.
17
19
18
20
.. note ::
19
21
20
- You can use any of the following restrictions individually or mix them together to get
21
- your desired firewall configuration.
22
+ You can use any of the following restrictions individually or mix them
23
+ together to get your desired firewall configuration.
22
24
23
25
Restricting by Path
24
26
~~~~~~~~~~~~~~~~~~~
25
27
26
- This is the default restriction and restricts a firewall to only be initialized if the request path
27
- matches the configured ``pattern ``.
28
+ This is the default restriction and restricts a firewall to only be initialized
29
+ if the request path matches the configured ``pattern ``.
28
30
29
31
.. configuration-block ::
30
32
@@ -201,7 +203,7 @@ If the above options don't fit your needs you can configure any service implemen
201
203
202
204
.. code-block :: yaml
203
205
204
- # config/packages /security.yaml
206
+ # app/config /security.yaml
205
207
206
208
# ...
207
209
security :
@@ -212,7 +214,7 @@ If the above options don't fit your needs you can configure any service implemen
212
214
213
215
.. code-block :: xml
214
216
215
- <!-- config/packages /security.xml -->
217
+ <!-- app/config /security.xml -->
216
218
<?xml version =" 1.0" encoding =" UTF-8" ?>
217
219
<srv : container xmlns =" http://symfony.com/schema/dic/security"
218
220
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
@@ -230,7 +232,7 @@ If the above options don't fit your needs you can configure any service implemen
230
232
231
233
.. code-block :: php
232
234
233
- // config/packages /security.php
235
+ // app/config /security.php
234
236
235
237
// ...
236
238
$container->loadFromExtension('security', [
0 commit comments