Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
3aac0aa2
Commit
3aac0aa2
authored
May 23, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改网关
parent
919c1a28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
AccessGatewayFilter.java
...hub/wxiaoqi/security/gate/filter/AccessGatewayFilter.java
+6
-2
No files found.
ace-gate/src/main/java/com/github/wxiaoqi/security/gate/filter/AccessGatewayFilter.java
View file @
3aac0aa2
...
@@ -72,7 +72,8 @@ public class AccessGatewayFilter implements GlobalFilter {
...
@@ -72,7 +72,8 @@ public class AccessGatewayFilter implements GlobalFilter {
// private String zuulPrefix;
// private String zuulPrefix;
private
static
final
String
GATE_WAY_PREFIX
=
"/api"
;
private
static
final
String
GATE_WAY_PREFIX
=
"/api"
;
private
static
final
String
GATE_WAY_UNAUTH
=
"/app/unauth"
;
@Value
(
"${gate.ignore.unauth}"
)
private
String
GATE_WAY_UNAUTH
;
@Autowired
@Autowired
private
UserAuthUtil
userAuthUtil
;
private
UserAuthUtil
userAuthUtil
;
...
@@ -248,8 +249,11 @@ public class AccessGatewayFilter implements GlobalFilter {
...
@@ -248,8 +249,11 @@ public class AccessGatewayFilter implements GlobalFilter {
*/
*/
private
boolean
isStartWith
(
String
requestUri
)
{
private
boolean
isStartWith
(
String
requestUri
)
{
boolean
flag
=
false
;
boolean
flag
=
false
;
if
(
requestUri
.
contains
(
GATE_WAY_UNAUTH
)){
return
true
;
}
for
(
String
s
:
startWith
.
split
(
","
))
{
for
(
String
s
:
startWith
.
split
(
","
))
{
if
(
requestUri
.
startsWith
(
s
)
||
requestUri
.
contains
(
GATE_WAY_UNAUTH
)
)
{
if
(
requestUri
.
startsWith
(
s
))
{
return
true
;
return
true
;
}
}
}
}
...
...
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