Skip to content

mrs2000/yii2-deny-trash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yii2-deny-trash

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages