@@ -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 ``
26
+ * ``ip `` or ``ips `` (netmask is supported)
27
27
* ``host ``
28
28
* ``methods ``
29
29
@@ -176,7 +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
- - { path: ^/internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
179
+ - { path: ^/internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1, 192.168.0.1/24 ] }
180
180
- { path: ^/internal, roles: ROLE_NO_ACCESS }
181
181
182
182
.. code-block :: xml
@@ -193,7 +193,7 @@ pattern so that it is only accessible by requests from the local server itself:
193
193
<!-- ... -->
194
194
<rule path =" ^/internal"
195
195
role =" IS_AUTHENTICATED_ANONYMOUSLY"
196
- ips =" 127.0.0.1, ::1"
196
+ ips =" 127.0.0.1, ::1, 192.168.0.1/24 "
197
197
/>
198
198
199
199
<rule path =" ^/internal" role =" ROLE_NO_ACCESS" />
@@ -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' => '127.0.0.1, ::1, 192.168.0.1/24 ',
213
213
),
214
214
array(
215
215
'path' => '^/internal',
@@ -239,6 +239,8 @@ address):
239
239
240
240
* The second access rule is not examined as the first rule matched.
241
241
242
+ IP netmask is supported. You can write ``ip `` or ``ips `` with ``192.168.0.1/24 `` or ``192.168.0.1/32 ``.
243
+
242
244
.. _security-allow-if :
243
245
244
246
Securing by an Expression
0 commit comments