@@ -192,11 +192,12 @@ pattern so that it is only accessible by requests from the local server itself:
192
192
193
193
<config >
194
194
<!-- ... -->
195
+
195
196
<!-- the 'ips' option supports IP addresses and subnet masks -->
196
- <rule path =" ^/internal"
197
- role = " IS_AUTHENTICATED_ANONYMOUSLY "
198
- ips = " 127.0.0.1, ::1, 192.168.0.1/24 "
199
- / >
197
+ <rule path =" ^/internal" role = " IS_AUTHENTICATED_ANONYMOUSLY " >
198
+ < ip >127.0.0.1</ ip >
199
+ < ip > ::1</ ip >
200
+ </ rule >
200
201
201
202
<rule path =" ^/internal" role =" ROLE_NO_ACCESS" />
202
203
</config >
@@ -212,7 +213,7 @@ pattern so that it is only accessible by requests from the local server itself:
212
213
'path' => '^/internal',
213
214
'role' => 'IS_AUTHENTICATED_ANONYMOUSLY',
214
215
// the 'ips' option supports IP addresses and subnet masks
215
- 'ips' => '127.0.0.1, ::1, 192.168.0.1/24' ,
216
+ 'ips' => array( '127.0.0.1', ' ::1') ,
216
217
),
217
218
array(
218
219
'path' => '^/internal',
@@ -265,10 +266,19 @@ key:
265
266
266
267
.. code-block :: xml
267
268
268
- <access-control >
269
+ <!-- app/config/security.xml -->
270
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
271
+ <srv : container xmlns =" http://symfony.com/schema/dic/security"
272
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
273
+ xmlns : srv =" http://symfony.com/schema/dic/services"
274
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
275
+ http://symfony.com/schema/dic/services/services-1.0.xsd" >
276
+
277
+ <config >
269
278
<rule path =" ^/_internal/secure"
270
279
allow-if =" '127.0.0.1' == request.getClientIp() or has_role('ROLE_ADMIN')" />
271
- </access-control >
280
+ </config >
281
+ </srv : container >
272
282
273
283
.. code-block :: php
274
284
0 commit comments