Merge branch 'security'

This commit is contained in:
SilverFire - Dmitry Naumenko
2019-01-28 22:50:38 +02:00
7 changed files with 83 additions and 4 deletions

View File

@ -216,6 +216,17 @@ You may configure `logVars` to be an empty array to totally disable the inclusio
Or if you want to implement your own way of providing context information, you may override the
[[yii\log\Target::getContextMessage()]] method.
In case some of your request fields contain sensitive information you would not like to log (e.g. passwords, access tokens),
you may additionally configure `maskVars` property. By default, the following request parameters will be masked with `***`:
`$_SERVER[HTTP_AUTHORIZATION]`, `$_SERVER[PHP_AUTH_USER]`, `$_SERVER[PHP_AUTH_PW]`, but you can set your own:
```php
[
'class' => 'yii\log\FileTarget',
'logVars' => ['_SERVER'],
'maskVars' => ['_SERVER.HTTP_X_PASSWORD']
]
```
### Message Trace Level <span id="trace-level"></span>