Skip to content

Commit f098fb5

Browse files
committed
新增IP屏蔽检测
1 parent 44bab4c commit f098fb5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "addons package for fastadmin",
44
"homepage": "https://github.com/karsonzhang/fastadmin-addons",
55
"license": "Apache-2.0",
6-
"version": "1.2.8",
6+
"version": "1.2.9",
77
"authors": [
88
{
99
"name": "Karson",

src/addons/Controller.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ public function __construct(Request $request = null)
9797

9898
protected function _initialize()
9999
{
100+
// 检测IP是否允许
101+
if (function_exists("check_ip_allowed")) {
102+
check_ip_allowed();
103+
}
104+
100105
// 渲染配置到视图中
101106
$config = get_addon_config($this->addon);
102107
$this->view->assign("config", $config);

0 commit comments

Comments
 (0)