tyrellsys/cakephp3-ip-filter
最新稳定版本:v0.1.1
Composer 安装命令:
composer require tyrellsys/cakephp3-ip-filter
包简介
restrict access by ip address for CakePHP3
README 文档
README
restrict access by ip address for CakePHP3 Component
Installation
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
composer require tyrellsys/cakephp3-ip-filter
Configuration
Controller::initialize
...
public function initialize($event)
{
....
$this->loadComponent('Tyrellsys/CakePHP3IpFilter.IpFilter', [
'trustProxy' => true,
'whitelist' => '192.168.0.0/24' // array OR comma separate value
]);
...
Method
bool check(string $ip = null)- returns comparewhitelist.void checkOrFail(string $ip = null)- throws \Cake\Http\Exception\ForbiddenException when bad ip address.
统计信息
- 总下载量: 6.18k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2019-07-09