Skip to content

JingxuanZhang/ipblock-for-tp6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ipblock-for-tp6

ipblock service for thinkphp6.0

示例

composer require moonpie/think-ipblock

之后,在项目配置目录config下会多出ipblock.php

根据配置文件注解,选择好自己要使用的IP定位器和白名单规则

声明需要中间件保护的路由信息

// route/app.php

Route::get('should protect by ip-block')
->middleware(\Moonpie\Tp6Tools\IpBlock\Middleware\IpBlock::class);

这样您的网站就只能在满足地理位置的条件下才能访问了

About

ipblock service for thinkphp6.0

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages