mrssoft/yii2-deny-trash

Adds a ban on access by ip address, in accordance with the rules.

1.2.2 2021-06-04 01:01 UTC

This package is auto-updated.

Last update: 2024-11-04 08:26:52 UTC


README

Adds a ban on access by ip address, in accordance with the rules

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist mrssoft/yii2-deny-trash "*"

or add

"mrssoft/yii2-deny-trash": "*"

to the require section of your composer.json file.

Usage

Configuration:

'components' => [
    ...
    'log' => [
        'targets' => [
        [
            'class' => 'mrssoft\denytrash\DenyTrashTarget',
            'levels' => ['error'],
            'serverType' => 'Apache',
            'excludeIp' => ['195.206.45.15'],
            'enabled' => true,
        ],
   ]
   ....
]

.htaccess:

...
order deny,allow
...

Setting rules

Setting rules in a file options.json