Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
micro_app
gk
Commits
9f98a5a0
Commit
9f98a5a0
authored
Jun 04, 2026
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(interceptor): 拦截器优化
parent
fe879a1c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
SecurityInterceptor.java
...dlbridge/jadp/common/interceptor/SecurityInterceptor.java
+8
-6
No files found.
src/main/java/com/dlbridge/jadp/common/interceptor/SecurityInterceptor.java
View file @
9f98a5a0
...
@@ -75,12 +75,6 @@ public class SecurityInterceptor extends JService implements HandlerInterceptor
...
@@ -75,12 +75,6 @@ public class SecurityInterceptor extends JService implements HandlerInterceptor
return
true
;
return
true
;
}
}
// /gk/ 和 /easy/ 路径要求session登录
if
((
uri
.
startsWith
(
"/gk/"
)
||
uri
.
contains
(
"easy"
))
&&
request
.
getSession
().
getAttribute
(
"user"
)
==
null
)
{
response
.
sendRedirect
(
domain
+
"auth_no"
);
return
false
;
}
// 小程序请求放行(小程序没有session)
// 小程序请求放行(小程序没有session)
String
userAgent
=
request
.
getHeader
(
"user-agent"
);
String
userAgent
=
request
.
getHeader
(
"user-agent"
);
if
(
userAgent
!=
null
)
{
if
(
userAgent
!=
null
)
{
...
@@ -90,6 +84,14 @@ public class SecurityInterceptor extends JService implements HandlerInterceptor
...
@@ -90,6 +84,14 @@ public class SecurityInterceptor extends JService implements HandlerInterceptor
}
}
}
}
// /gk/ 和 /easy/ 路径要求session登录
if
((
uri
.
startsWith
(
"/gk/"
)
||
uri
.
contains
(
"easy"
))
&&
request
.
getSession
().
getAttribute
(
"user"
)
==
null
)
{
response
.
sendRedirect
(
domain
+
"auth_no"
);
return
false
;
}
if
(
annotation
!=
null
)
{
if
(
annotation
!=
null
)
{
// 已登录的用户跳过sign校验
// 已登录的用户跳过sign校验
if
(
request
.
getSession
().
getAttribute
(
"user"
)
!=
null
)
{
if
(
request
.
getSession
().
getAttribute
(
"user"
)
!=
null
)
{
...
...
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