定制 overflowsith/firewall 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

overflowsith/firewall

最新稳定版本:v0.1.1

Composer 安装命令:

composer require overflowsith/firewall

包简介

simple, configuration based firewall for laravel

README 文档

README

Add the package to your composer.json file and run composer update:

{
    "require": {
        "overflowsith/firewall": "dev-master"
    }
}

Add Overflowsith\Firewall\FirewallServiceProvider to your app/config/app.php file, inside the providers array.

Publish the package's config with php artisan config:publish overflowsith/firewall, so you can easily modify it in: app/config/packages/overflowsith/firewall/config.php

Usage

This firewall package can be use in the App::before filter

App::before(function($request)
{
    if (Firewall::isNotAllowed($request->ip())) {
        return Firewall::renderAccessDenied();
    }
});

Configuration

Firewall status

  • disabled: every IP is allowed
  • permissive: only IP addresses that are not in the blacklist are allowed
  • enforcing: an IP must be in the whitelist and not in the blacklist

Whitelist and blacklist

You can set an array of IP addresses with or without wildcards, for example

   '127.0.0.1',
   '192.168.*',

统计信息

  • 总下载量: 104
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-02-05