@@ -192,11 +192,12 @@ pattern so that it is only accessible by requests from the local server itself:
192192
193193 <config >
194194 <!-- ... -->
195+
195196 <!-- 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 >
200201
201202 <rule path =" ^/internal" role =" ROLE_NO_ACCESS" />
202203 </config >
@@ -212,7 +213,7 @@ pattern so that it is only accessible by requests from the local server itself:
212213 'path' => '^/internal',
213214 'role' => 'IS_AUTHENTICATED_ANONYMOUSLY',
214215 // 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') ,
216217 ),
217218 array(
218219 'path' => '^/internal',
@@ -265,10 +266,19 @@ key:
265266
266267 .. code-block :: xml
267268
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 >
269278 <rule path =" ^/_internal/secure"
270279 allow-if =" '127.0.0.1' == request.getClientIp() or has_role('ROLE_ADMIN')" />
271- </access-control >
280+ </config >
281+ </srv : container >
272282
273283 .. code-block :: php
274284
0 commit comments