Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
head_group
xyqb-user2
Commits
f3632394
Commit
f3632394
authored
Nov 22, 2021
by
李健华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉IP白名单注释
parent
c16c869e
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43696 additions
and
7 deletions
+43696
-7
IpValidateAdvisor.java
.../quantgroup/xyqb/aspect/accessable/IpValidateAdvisor.java
+7
-7
xyqb-user2.2021-11-21-0.log
xyqb-user2.2021-11-21-0.log
+43689
-0
No files found.
src/main/java/cn/quantgroup/xyqb/aspect/accessable/IpValidateAdvisor.java
View file @
f3632394
package
cn
.
quantgroup
.
xyqb
.
aspect
.
accessable
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.util.IpUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.aspectj.lang.ProceedingJoinPoint
;
...
...
@@ -36,12 +37,11 @@ public class IpValidateAdvisor {
String
clientIp
=
IpUtil
.
getRemoteIP
(
request
);
// 白名单
return
pjp
.
proceed
();
// if (IpUtil.whiteOf(clientIp)) {
// return pjp.proceed();
// }
// IpUtil.logIp(log, request);
// log.error("Lock_ipv4: don't match white ip access:{}", clientIp);
// return JsonResult.buildErrorStateResult("非法访问", null);
if
(
IpUtil
.
whiteOf
(
clientIp
))
{
return
pjp
.
proceed
();
}
IpUtil
.
logIp
(
log
,
request
);
log
.
error
(
"Lock_ipv4: don't match white ip access:{}"
,
clientIp
);
return
JsonResult
.
buildErrorStateResult
(
"非法访问"
,
null
);
}
}
xyqb-user2.2021-11-21-0.log
0 → 100644
View file @
f3632394
This diff is collapsed.
Click to expand it.
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