Skip to content

Commit e5d25ea

Browse files
authored
Merge pull request #7827 from kenjis/docs-filters.rst
docs: improve filters.rst
2 parents ced6be8 + 51d4dfd commit e5d25ea

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

user_guide_src/source/incoming/filters.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ Except for a Few URIs
120120
There are times where you want to apply a filter to almost every request, but have a few that should be left alone.
121121
One common example is if you need to exclude a few URI's from the CSRF protection filter to allow requests from
122122
third-party websites to hit one or two specific URI's, while keeping the rest of them protected. To do this, add
123-
an array with the ``except`` key and a URI to match as the value alongside the alias:
123+
an array with the ``except`` key and a URI path (relative to BaseURL) to match as the value alongside the alias:
124124

125125
.. literalinclude:: filters/006.php
126126

127-
Any place you can use a URI in the filter settings, you can use a regular expression or, like in this example, use
128-
an asterisk (``*``) for a wildcard that will match all characters after that. In this example, any URL's starting with ``api/``
127+
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
128+
an asterisk (``*``) for a wildcard that will match all characters after that. In this example, any URI path starting with ``api/``
129129
would be exempted from CSRF protection, but the site's forms would all be protected. If you need to specify multiple
130-
URI's you can use an array of URI patterns:
130+
URI paths, you can use an array of URI path patterns:
131131

132132
.. literalinclude:: filters/007.php
133133

@@ -153,7 +153,7 @@ $filters
153153
========
154154

155155
This property is an array of filter aliases. For each alias, you can specify ``before`` and ``after`` arrays that contain
156-
a list of URI patterns that filter should apply to:
156+
a list of URI path (relative to BaseURL) patterns that filter should apply to:
157157

158158
.. literalinclude:: filters/009.php
159159

user_guide_src/source/incoming/filters/008.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ class Filters extends BaseConfig
99
// ...
1010

1111
public array $methods = [
12-
'post' => ['foo', 'bar'],
13-
'get' => ['baz'],
12+
'post' => ['InvalidChars', 'csrf'],
13+
'get' => ['csrf'],
1414
];
1515

1616
// ...

0 commit comments

Comments
 (0)