2017 © Pedro Peláez
 

yii2-extension yii2-redis-ipban

Yii 2 Redis IP ban filter action.

image

maxodrom/yii2-redis-ipban

Yii 2 Redis IP ban filter action.

  • Monday, May 8, 2017
  • by mercium
  • Repository
  • 1 Watchers
  • 0 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 14 Versions
  • 0 % Grown

The README.md

yii2-redis-ipban

Yii2 Redis IP ban, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist maxodrom/yii2-redis-ipban

or add, (*4)

"maxodrom/yii2-redis-ipban": "~1.0"

to the require section of your composer.json., (*5)

Configuration & Usage

To use this extension, you have to configure the Connection class in your application configuration:, (*6)

return [
    //....
    'components' => [
        'redis' => [
            'class' => 'yii\redis\Connection',
            'hostname' => 'localhost',
            'port' => 6379,
            'database' => 0,
        ],
    ]
];

Also add the following to your application modules config:, (*7)

'modules' => [
    'redis-ip-ban' => [
        'class' => 'maxodrom\redis\ipban\Module',
        'redis' => 'redis',
        'allowedIPs' => [], // dont't check IPs, otherwise you can use for example this array ['127.0.0.1', '::1']
        'allowedRoles' => ['SuperAdmin'], // but check RBAC roles!
    ],
    ...
]

In your Controller you should use:, (*8)

/**
 * @inheritdoc
 */
public function behaviors()
{
    return [
        ...,
        'ipban' => [
            'class' => \maxodrom\redis\ipban\filters\RedisIpBan::className(),
            'redis' => Yii::$app->redis,
        ],
    ];
}

The Versions

08/05 2017

dev-master

9999999-dev

Yii 2 Redis IP ban filter action.

  Sources   Download

MIT

The Requires

 

filter yii2 redis ban ip

08/05 2017

1.4.2

1.4.2.0

Yii 2 Redis IP ban filter action.

  Sources   Download

MIT

The Requires

 

filter yii2 redis ban ip

08/05 2017

1.4.1

1.4.1.0

Yii 2 Redis IP ban filter action.

  Sources   Download

MIT

The Requires

 

filter yii2 redis ban ip

08/05 2017

1.4.0

1.4.0.0

Yii 2 Redis IP ban filter action.

  Sources   Download

MIT

The Requires

 

filter yii2 redis ban ip

17/04 2017

1.3.4

1.3.4.0

Yii 2 Redis IP ban filter action.

  Sources   Download

MIT

The Requires

 

filter yii2 redis ban ip

08/03 2017

1.3.3.1

1.3.3.1

Yii 2 Redis IP ban filter action.

  Sources   Download

MIT

The Requires

 

filter yii2 redis ban ip

08/03 2017

1.3.3

1.3.3.0

Yii 2 Redis IP ban filter action.

  Sources   Download

MIT

The Requires

 

filter yii2 redis ban ip

08/03 2017

1.3.2

1.3.2.0

Yii 2 Redis IP ban filter action.

  Sources   Download

MIT

The Requires

 

filter yii2 redis ban ip

08/03 2017

1.3.1

1.3.1.0

Yii 2 Redis IP ban filter action.

  Sources   Download

MIT

The Requires

 

filter yii2 redis ban ip

08/03 2017

1.3

1.3.0.0

Yii 2 Redis IP ban filter action.

  Sources   Download

MIT

The Requires

 

filter yii2 redis ban ip

08/03 2017

1.2

1.2.0.0

Yii 2 Redis IP ban filter action.

  Sources   Download

MIT

The Requires

 

filter yii2 redis ban ip

05/03 2017

1.1

1.1.0.0

Yii 2 Redis IP ban filter action.

  Sources   Download

MIT

The Requires

 

filter yii2 redis ban ip

05/03 2017

1.0

1.0.0.0

Yii 2 Redis IP ban filter action.

  Sources   Download

MIT

The Requires

 

filter yii2 redis ban ip

05/03 2017

0.1

0.1.0.0

Yii 2 Redis IP ban filter action.

  Sources   Download

MIT

The Requires

 

filter yii2 redis ban ip