File tree 1 file changed +16
-7
lines changed
1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -191,10 +191,10 @@ pattern so that it is only accessible by requests from the local server itself:
191
191
192
192
<config >
193
193
<!-- ... -->
194
- <rule path =" ^/internal"
195
- role = " IS_AUTHENTICATED_ANONYMOUSLY "
196
- ips = " 127.0.0.1, ::1"
197
- / >
194
+ <rule path =" ^/internal" role = " IS_AUTHENTICATED_ANONYMOUSLY " >
195
+ < ip >127.0.0.1</ ip >
196
+ < ip > ::1</ ip >
197
+ </ rule >
198
198
199
199
<rule path =" ^/internal" role =" ROLE_NO_ACCESS" />
200
200
</config >
@@ -209,7 +209,7 @@ pattern so that it is only accessible by requests from the local server itself:
209
209
array(
210
210
'path' => '^/internal',
211
211
'role' => 'IS_AUTHENTICATED_ANONYMOUSLY',
212
- 'ips' => '127.0.0.1, ::1',
212
+ 'ips' => array( '127.0.0.1', ' ::1') ,
213
213
),
214
214
array(
215
215
'path' => '^/internal',
@@ -262,10 +262,19 @@ key:
262
262
263
263
.. code-block :: xml
264
264
265
- <access-control >
265
+ <!-- app/config/security.xml -->
266
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
267
+ <srv : container xmlns =" http://symfony.com/schema/dic/security"
268
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
269
+ xmlns : srv =" http://symfony.com/schema/dic/services"
270
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
271
+ http://symfony.com/schema/dic/services/services-1.0.xsd" >
272
+
273
+ <config >
266
274
<rule path =" ^/_internal/secure"
267
275
allow-if =" '127.0.0.1' == request.getClientIp() or has_role('ROLE_ADMIN')" />
268
- </access-control >
276
+ </config >
277
+ </srv : container >
269
278
270
279
.. code-block :: php
271
280
You can’t perform that action at this time.
0 commit comments