@@ -23,7 +23,7 @@ access control should be used on this request. The following ``access_control``
23
23
options are used for matching:
24
24
25
25
* ``path ``
26
- * ``ip `` or ``ips `` (netmask is supported)
26
+ * ``ip `` or ``ips `` (netmasks are also supported)
27
27
* ``host ``
28
28
* ``methods ``
29
29
@@ -176,6 +176,7 @@ pattern so that it is only accessible by requests from the local server itself:
176
176
# ...
177
177
access_control :
178
178
#
179
+ # the 'ips' option supports IP addresses and subnet masks
179
180
- { path: ^/internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1, 192.168.0.1/24] }
180
181
- { path: ^/internal, roles: ROLE_NO_ACCESS }
181
182
@@ -191,6 +192,7 @@ pattern so that it is only accessible by requests from the local server itself:
191
192
192
193
<config >
193
194
<!-- ... -->
195
+ <!-- the 'ips' option supports IP addresses and subnet masks -->
194
196
<rule path =" ^/internal"
195
197
role =" IS_AUTHENTICATED_ANONYMOUSLY"
196
198
ips =" 127.0.0.1, ::1, 192.168.0.1/24"
@@ -209,6 +211,7 @@ pattern so that it is only accessible by requests from the local server itself:
209
211
array(
210
212
'path' => '^/internal',
211
213
'role' => 'IS_AUTHENTICATED_ANONYMOUSLY',
214
+ // the 'ips' option supports IP addresses and subnet masks
212
215
'ips' => '127.0.0.1, ::1, 192.168.0.1/24',
213
216
),
214
217
array(
@@ -239,8 +242,6 @@ address):
239
242
240
243
* The second access rule is not examined as the first rule matched.
241
244
242
- IP netmask is supported. You can write ``ip `` or ``ips `` with ``192.168.0.1/24 `` or ``192.168.0.1/32 ``.
243
-
244
245
.. _security-allow-if :
245
246
246
247
Securing by an Expression
0 commit comments