You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: user_guide_src/source/incoming/filters.rst
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,7 @@ Configuring Filters
82
82
There are two ways to configure filters when they get run. One is done in
83
83
**app/Config/Filters.php**, the other is done in **app/Config/Routes.php**.
84
84
85
-
If you want to specify filter to a specific route, use **app/Config/Routes.php**
85
+
If you want to specify filters to defined routes, use **app/Config/Routes.php**
86
86
and see :ref:`URI Routing <applying-filters>`.
87
87
88
88
.. Note:: The safest way to apply filters is to :ref:`disable auto-routing <use-defined-routes-only>`, and :ref:`set filters to routes <applying-filters>`.
@@ -95,9 +95,11 @@ configure exactly when the filters run.
95
95
96
96
.. Warning:: It is recommended that you should always add ``*`` at the end of a URI in the filter settings.
97
97
Because a controller method might be accessible by different URLs than you think.
98
-
For example, when :ref:`auto-routing-legacy` is enabled, if you have ``Blog::index``,
98
+
For example, when :ref:`auto-routing-legacy` is enabled, if you have ``Blog::index()``,
99
99
it can be accessible with ``blog``, ``blog/index``, and ``blog/index/1``, etc.
100
100
101
+
.. _filters-aliases:
102
+
101
103
$aliases
102
104
--------
103
105
@@ -172,7 +174,7 @@ an array with the ``except`` key and a URI path (relative to BaseURL) to match a
172
174
and the URI paths specified in the filter could be different.
173
175
See :ref:`upgrade-447-filter-paths` for details.
174
176
175
-
Any place you can use a URI path (relative to BaseURL) in the filter settings, you can use a regular expression or, like in this example, use
177
+
Any place you can use a URI path (relative to BaseURL) in the filter settings, you can use a regular expression or, like in this example above, use
176
178
an asterisk (``*``) for a wildcard that will match all characters after that. In this example, any URI path starting with ``api/``
177
179
would be exempted from CSRF protection, but the site's forms would all be protected.
0 commit comments