Commit f092bbdb by 孙龙

增加黑白名单

parent 8e7325f3
...@@ -76,6 +76,8 @@ Class AjaxController extends Controller ...@@ -76,6 +76,8 @@ Class AjaxController extends Controller
$header_transfor = $this->trimStr($header_transfor); $header_transfor = $this->trimStr($header_transfor);
$clientip_flow_limit = $request->input("clientip_flow_limit",""); $clientip_flow_limit = $request->input("clientip_flow_limit","");
$service_flow_limit = $request->input("service_flow_limit",""); $service_flow_limit = $request->input("service_flow_limit","");
$black_list = $request->input("black_list","");
$white_list = $request->input("white_list","");
$microServiceInfo = MicroServiceInfoModel::create([ $microServiceInfo = MicroServiceInfoModel::create([
"load_type"=>$load_type, "load_type"=>$load_type,
...@@ -91,6 +93,8 @@ Class AjaxController extends Controller ...@@ -91,6 +93,8 @@ Class AjaxController extends Controller
$bk = ServiceAccessControlModel::create([ $bk = ServiceAccessControlModel::create([
"service_id"=>$service_id, "service_id"=>$service_id,
"black_list"=>$black_list,
"white_list"=>$white_list,
"clientip_flow_limit"=>intval($clientip_flow_limit), "clientip_flow_limit"=>intval($clientip_flow_limit),
"service_flow_limit"=>intval($service_flow_limit), "service_flow_limit"=>intval($service_flow_limit),
]); ]);
...@@ -159,6 +163,8 @@ Class AjaxController extends Controller ...@@ -159,6 +163,8 @@ Class AjaxController extends Controller
$header_transfor = $this->trimStr($header_transfor); $header_transfor = $this->trimStr($header_transfor);
$clientip_flow_limit = $request->input("clientip_flow_limit",""); $clientip_flow_limit = $request->input("clientip_flow_limit","");
$service_flow_limit = $request->input("service_flow_limit",""); $service_flow_limit = $request->input("service_flow_limit","");
$black_list = $request->input("black_list","");
$white_list = $request->input("white_list","");
MicroServiceInfoModel::where(["id"=>$service_id])->update([ MicroServiceInfoModel::where(["id"=>$service_id])->update([
"load_type"=>$load_type, "load_type"=>$load_type,
...@@ -172,6 +178,8 @@ Class AjaxController extends Controller ...@@ -172,6 +178,8 @@ Class AjaxController extends Controller
"service_id"=>$service_id, "service_id"=>$service_id,
"clientip_flow_limit"=>intval($clientip_flow_limit), "clientip_flow_limit"=>intval($clientip_flow_limit),
"service_flow_limit"=>intval($service_flow_limit), "service_flow_limit"=>intval($service_flow_limit),
"black_list"=>$black_list,
"white_list"=>$white_list,
]); ]);
......
...@@ -69,6 +69,20 @@ ...@@ -69,6 +69,20 @@
</div> </div>
</div> </div>
<div class="layui-form-item layui-form-text" style="margin:4px 0">
<label class="layui-form-label">白名单</label>
<div class="layui-input-block">
<textarea name="white_list" class="layui-textarea" placeholder="格式:多个英文下,隔开">{{isset($microInfo) ? $microInfo->service_access_control->white_list : ''}}</textarea>
</div>
</div>
<div class="layui-form-item layui-form-text" style="margin:4px 0">
<label class="layui-form-label">黑名单</label>
<div class="layui-input-block">
<textarea name="black_list" class="layui-textarea" placeholder="格式:多个英文下,隔开">{{isset($microInfo) ? $microInfo->service_access_control->black_list : ''}}</textarea>
</div>
</div>
<div class="layui-form-item layui-form-text"> <div class="layui-form-item layui-form-text">
<label class="layui-form-label">转发方式</label> <label class="layui-form-label">转发方式</label>
<div class="layui-inline"> <div class="layui-inline">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment