Skip to content

Commit 75a9350

Browse files
committed
docs: small improvements
1 parent 33dc973 commit 75a9350

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

user_guide_src/source/incoming/filters.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Configuring Filters
8282
There are two ways to configure filters when they get run. One is done in
8383
**app/Config/Filters.php**, the other is done in **app/Config/Routes.php**.
8484

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**
8686
and see :ref:`URI Routing <applying-filters>`.
8787

8888
.. 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.
9595

9696
.. Warning:: It is recommended that you should always add ``*`` at the end of a URI in the filter settings.
9797
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()``,
9999
it can be accessible with ``blog``, ``blog/index``, and ``blog/index/1``, etc.
100100

101+
.. _filters-aliases:
102+
101103
$aliases
102104
--------
103105

@@ -172,7 +174,7 @@ an array with the ``except`` key and a URI path (relative to BaseURL) to match a
172174
and the URI paths specified in the filter could be different.
173175
See :ref:`upgrade-447-filter-paths` for details.
174176

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
176178
an asterisk (``*``) for a wildcard that will match all characters after that. In this example, any URI path starting with ``api/``
177179
would be exempted from CSRF protection, but the site's forms would all be protected.
178180

user_guide_src/source/incoming/routing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ The value for the filter can be a string or an array of strings:
394394
* matching the aliases defined in **app/Config/Filters.php**.
395395
* filter classnames
396396

397-
See :doc:`Controller Filters <filters>` for more information on setting up filters.
397+
See :ref:`Controller Filters <filters-aliases>` for more information on defining aliases.
398398

399399
.. Warning:: If you set filters to routes in **app/Config/Routes.php**
400400
(not in **app/Config/Filters.php**), it is recommended to disable Auto Routing (Legacy).
@@ -406,7 +406,7 @@ See :doc:`Controller Filters <filters>` for more information on setting up filte
406406
Alias Filter
407407
------------
408408

409-
You specify an alias defined in **app/Config/Filters.php** for the filter value:
409+
You specify an alias :ref:`defined in app/Config/Filters.php <filters-aliases>` for the filter value:
410410

411411
.. literalinclude:: routing/034.php
412412

@@ -419,7 +419,7 @@ Classname Filter
419419

420420
.. versionadded:: 4.1.5
421421

422-
You specify a filter classname for the filter value:
422+
You can specify a filter classname for the filter value:
423423

424424
.. literalinclude:: routing/036.php
425425

@@ -436,7 +436,7 @@ Multiple Filters
436436
:ref:`Upgrading from 4.1.4 to 4.1.5 <upgrade-415-multiple-filters-for-a-route>`
437437
for the details.
438438

439-
You specify an array for the filter value:
439+
You can specify an array for the filter value:
440440

441441
.. literalinclude:: routing/037.php
442442

0 commit comments

Comments
 (0)