Skip to content

Commit 4f75e9b

Browse files
authored
Merge pull request #5284 from kenjis/fix-docs-routing.rst
docs: improve routing.rst
2 parents 6b882e9 + ae9f434 commit 4f75e9b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

user_guide_src/source/incoming/routing.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,12 @@ routes. With the examples URLs from above::
119119

120120
will only match product/123 and generate 404 errors for other example.
121121

122-
.. important:: While the ``add()`` method is convenient, it is recommended to always use the HTTP-verb-based
123-
routes, described below, as it is more secure. It will also provide a slight performance increase, since
122+
.. warning:: While the ``add()`` method is convenient, it is recommended to always use the HTTP-verb-based
123+
routes, described below, as it is more secure. If you use the :doc:`CSRF protection </libraries/security>`, it does not protect **GET**
124+
requests. If the URI specified in the ``add()`` method is accessible by the GET method, the CSRF protection
125+
will not work.
126+
127+
.. note:: Using the HTTP-verb-based routes will also provide a slight performance increase, since
124128
only routes that match the current request method are stored, resulting in fewer routes to scan through
125129
when trying to find a match.
126130

@@ -558,6 +562,9 @@ to only those defined by you, by setting the ``setAutoRoute()`` option to false:
558562

559563
$routes->setAutoRoute(false);
560564

565+
.. warning:: If you use the :doc:`CSRF protection </libraries/security>`, it does not protect **GET**
566+
requests. If the URI is accessible by the GET method, the CSRF protection will not work.
567+
561568
404 Override
562569
------------
563570

0 commit comments

Comments
 (0)