@@ -119,9 +119,12 @@ You should define as many aliases as you need.
119119$globals
120120========
121121
122- The second section allows you to define any filters that should be applied to every request made by the framework.
122+ The second section allows you to define any filters that should be applied to every valid request made by the framework.
123+
123124You should take care with how many you use here, since it could have performance implications to have too many
124- run on every request. Filters can be specified by adding their alias to either the before or after array:
125+ run on every request.
126+
127+ Filters can be specified by adding their alias to either the ``before `` or ``after `` array:
125128
126129.. literalinclude :: filters/005.php
127130
@@ -130,14 +133,18 @@ Except for a Few URIs
130133
131134There are times where you want to apply a filter to almost every request, but have a few that should be left alone.
132135One common example is if you need to exclude a few URI's from the CSRF protection filter to allow requests from
133- third-party websites to hit one or two specific URI's, while keeping the rest of them protected. To do this, add
136+ third-party websites to hit one or two specific URI's, while keeping the rest of them protected.
137+
138+ To do this, add
134139an array with the ``except `` key and a URI path (relative to BaseURL) to match as the value alongside the alias:
135140
136141.. literalinclude :: filters/006.php
137142
138143Any 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
139144an asterisk (``* ``) for a wildcard that will match all characters after that. In this example, any URI path starting with ``api/ ``
140- would be exempted from CSRF protection, but the site's forms would all be protected. If you need to specify multiple
145+ would be exempted from CSRF protection, but the site's forms would all be protected.
146+
147+ If you need to specify multiple
141148URI paths, you can use an array of URI path patterns:
142149
143150.. literalinclude :: filters/007.php
0 commit comments