Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
scrm
/
rest-scrm-gateway-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 52e61085
authored
Apr 04, 2023
by
黄超华
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
IP鉴权过滤器bug
1 parent
85b90edb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
src/main/java/com/glsx/plat/gateway/filter/IPCheckGlobalFilter.java
src/main/java/com/glsx/plat/gateway/filter/IPCheckGlobalFilter.java
View file @
52e6108
...
@@ -49,7 +49,7 @@ public class IPCheckGlobalFilter implements GlobalFilter, Ordered {
...
@@ -49,7 +49,7 @@ public class IPCheckGlobalFilter implements GlobalFilter, Ordered {
ServerHttpRequest
request
=
exchange
.
getRequest
();
ServerHttpRequest
request
=
exchange
.
getRequest
();
String
requestIp
=
GatewayIpUtils
.
getIpAddr
(
request
);
String
requestIp
=
GatewayIpUtils
.
getIpAddr
(
request
);
//判断请求方IP是否在白名单内
//判断请求方IP是否在白名单内
String
ips
=
metadata
.
get
(
IP_AUTH
_KEY_NAME
).
toString
();
String
ips
=
metadata
.
get
(
WHITE_IP_LIST
_KEY_NAME
).
toString
();
if
(
Arrays
.
asList
(
ips
.
split
(
","
)).
contains
(
requestIp
)){
if
(
Arrays
.
asList
(
ips
.
split
(
","
)).
contains
(
requestIp
)){
return
chain
.
filter
(
exchange
);
return
chain
.
filter
(
exchange
);
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment