Skip to content

Commit 55f92fe

Browse files
authored
Merge pull request #443 from datamweb/fix-protect-all-pages
docs: fix protect all url with `$globals`
2 parents 94dc773 + 1bd2697 commit 55f92fe

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/install.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,15 @@ These can be used in any of the [normal filter config settings](https://codeigni
146146

147147
### Protect All Pages
148148

149-
If you want to limit all routes (e.g. `localhost:8080/admin`, `localhost:8080/panel` and ...), you need to add the following code in the `app\Config\Filters.php` file.
149+
If you want to limit all routes (e.g. `localhost:8080/admin`, `localhost:8080/panel` and ...), you need to add the following code in the `app/Config/Filters.php` file.
150150

151151
```php
152-
public $filters = [
153-
'session' => ['except' => ['login*', 'register*']],
152+
public $globals = [
153+
'before' => [
154+
// ...
155+
'session' => ['except' => ['login*', 'register*']],
156+
],
157+
// ...
154158
];
155159
```
156160

0 commit comments

Comments
 (0)