Skip to content

Commit 9399b61

Browse files
committed
docs: add note to not recommened methods
1 parent 99ef79b commit 9399b61

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

user_guide_src/source/incoming/routing.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,10 @@ routes defined within this closure are only accessible from the given environmen
290290
Routes with any HTTP verbs
291291
==========================
292292

293+
.. important:: This method exists only for backward compatibility. Do not use it
294+
in new projects. Even if you are already using it, we recommend that you use
295+
another, more appropriate method.
296+
293297
.. warning:: While the ``add()`` method seems to be convenient, it is recommended to always use the HTTP-verb-based
294298
routes, described above, as it is more secure. If you use the :doc:`CSRF protection </libraries/security>`, it does not protect **GET**
295299
requests. If the URI specified in the ``add()`` method is accessible by the GET method, the CSRF protection
@@ -307,6 +311,10 @@ You can use the ``add()`` method:
307311
Mapping Multiple Routes
308312
=======================
309313

314+
.. important:: This method exists only for backward compatibility. Do not use it
315+
in new projects. Even if you are already using it, we recommend that you use
316+
another, more appropriate method.
317+
310318
.. warning:: The ``map()`` method is not recommended as well as ``add()``
311319
because it calls ``add()`` internally.
312320

0 commit comments

Comments
 (0)