File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
user_guide_src/source/incoming Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -360,6 +360,13 @@ The value for the filter can be a string or an array of strings:
360
360
361
361
See `Controller filters <filters.html >`_ for more information on setting up filters.
362
362
363
+ .. Warning :: If you set filters to routes in **app/Config/Routes.php**
364
+ (not in **app/Config/Filters.php **), it is recommended to disable auto-routing.
365
+ When auto-routing is enabled, it may be possible that a controller can be accessed
366
+ via a different URL than the configured route,
367
+ in which case the filter you specified to the route will not be applied.
368
+ See :ref: `use-defined-routes-only ` to disable auto-routing.
369
+
363
370
**Alias filter **
364
371
365
372
You specify an alias defined in **app/Config/Filters.php ** for the filter value::
@@ -540,6 +547,8 @@ dash isn’t a valid class or method name character and would cause a fatal erro
540
547
541
548
$routes->setTranslateURIDashes(true);
542
549
550
+ .. _use-defined-routes-only :
551
+
543
552
Use Defined Routes Only
544
553
-----------------------
545
554
You can’t perform that action at this time.
0 commit comments