Skip to content

Commit

Permalink
Merge pull request #8171 from kenjis/docs-routes-add-not-recommended
Browse files Browse the repository at this point in the history
docs: add notes to not recommened methods in routing.rst
  • Loading branch information
kenjis authored Nov 9, 2023
2 parents dc911c0 + 9399b61 commit 9c4e051
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions user_guide_src/source/incoming/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ routes defined within this closure are only accessible from the given environmen
Routes with any HTTP verbs
==========================

.. important:: This method exists only for backward compatibility. Do not use it
in new projects. Even if you are already using it, we recommend that you use
another, more appropriate method.

.. warning:: While the ``add()`` method seems to be convenient, it is recommended to always use the HTTP-verb-based
routes, described above, as it is more secure. If you use the :doc:`CSRF protection </libraries/security>`, it does not protect **GET**
requests. If the URI specified in the ``add()`` method is accessible by the GET method, the CSRF protection
Expand All @@ -307,6 +311,10 @@ You can use the ``add()`` method:
Mapping Multiple Routes
=======================

.. important:: This method exists only for backward compatibility. Do not use it
in new projects. Even if you are already using it, we recommend that you use
another, more appropriate method.

.. warning:: The ``map()`` method is not recommended as well as ``add()``
because it calls ``add()`` internally.

Expand Down

0 comments on commit 9c4e051

Please sign in to comment.