Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
ichunt-micro-geteway
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f092bbdb
authored
Jan 20, 2021
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
增加黑白名单
parent
8e7325f3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
app/Http/Controllers/AjaxController.php
resources/views/web/addMicroService.blade.php
app/Http/Controllers/AjaxController.php
View file @
f092bbdb
...
...
@@ -76,6 +76,8 @@ Class AjaxController extends Controller
$header_transfor
=
$this
->
trimStr
(
$header_transfor
);
$clientip_flow_limit
=
$request
->
input
(
"clientip_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
([
"load_type"
=>
$load_type
,
...
...
@@ -91,6 +93,8 @@ Class AjaxController extends Controller
$bk
=
ServiceAccessControlModel
::
create
([
"service_id"
=>
$service_id
,
"black_list"
=>
$black_list
,
"white_list"
=>
$white_list
,
"clientip_flow_limit"
=>
intval
(
$clientip_flow_limit
),
"service_flow_limit"
=>
intval
(
$service_flow_limit
),
]);
...
...
@@ -159,6 +163,8 @@ Class AjaxController extends Controller
$header_transfor
=
$this
->
trimStr
(
$header_transfor
);
$clientip_flow_limit
=
$request
->
input
(
"clientip_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
([
"load_type"
=>
$load_type
,
...
...
@@ -172,6 +178,8 @@ Class AjaxController extends Controller
"service_id"
=>
$service_id
,
"clientip_flow_limit"
=>
intval
(
$clientip_flow_limit
),
"service_flow_limit"
=>
intval
(
$service_flow_limit
),
"black_list"
=>
$black_list
,
"white_list"
=>
$white_list
,
]);
...
...
resources/views/web/addMicroService.blade.php
View file @
f092bbdb
...
...
@@ -69,6 +69,20 @@
</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"
>
<label
class=
"layui-form-label"
>
转发方式
</label>
<div
class=
"layui-inline"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment