Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apollo
Project overview
Project overview
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
Administrator
apollo
Commits
5c5deb7e
Commit
5c5deb7e
authored
Dec 01, 2019
by
Jason Song
Committed by
kezhenxu94
Dec 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
normalize url for prefix path (#2807)
parent
c102e2b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PrefixPathController.java
...mework/apollo/portal/controller/PrefixPathController.java
+1
-1
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/AuthConfiguration.java
...rk/apollo/portal/spi/configuration/AuthConfiguration.java
+2
-2
apollo-portal/src/main/resources/static/login.html
apollo-portal/src/main/resources/static/login.html
+1
-1
No files found.
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PrefixPathController.java
View file @
5c5deb7e
...
@@ -11,7 +11,7 @@ public class PrefixPathController {
...
@@ -11,7 +11,7 @@ public class PrefixPathController {
@Value
(
"${prefixPath:}"
)
@Value
(
"${prefixPath:}"
)
private
String
prefixPath
;
private
String
prefixPath
;
@GetMapping
(
"/prefix
P
ath"
)
@GetMapping
(
"/prefix
-p
ath"
)
public
String
getPrefixPath
(){
public
String
getPrefixPath
(){
return
prefixPath
;
return
prefixPath
;
}
}
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/AuthConfiguration.java
View file @
5c5deb7e
...
@@ -271,7 +271,7 @@ public class AuthConfiguration {
...
@@ -271,7 +271,7 @@ public class AuthConfiguration {
http
.
csrf
().
disable
();
http
.
csrf
().
disable
();
http
.
headers
().
frameOptions
().
sameOrigin
();
http
.
headers
().
frameOptions
().
sameOrigin
();
http
.
authorizeRequests
()
http
.
authorizeRequests
()
.
antMatchers
(
"/prometheus/**"
,
"/metrics/**"
,
"/openapi/**"
,
"/vendor/**"
,
"/styles/**"
,
"/scripts/**"
,
"/views/**"
,
"/img/**"
,
"/i18n/**"
,
"/prefix
P
ath"
).
permitAll
()
.
antMatchers
(
"/prometheus/**"
,
"/metrics/**"
,
"/openapi/**"
,
"/vendor/**"
,
"/styles/**"
,
"/scripts/**"
,
"/views/**"
,
"/img/**"
,
"/i18n/**"
,
"/prefix
-p
ath"
).
permitAll
()
.
antMatchers
(
"/**"
).
hasAnyRole
(
USER_ROLE
);
.
antMatchers
(
"/**"
).
hasAnyRole
(
USER_ROLE
);
http
.
formLogin
().
loginPage
(
"/signin"
).
defaultSuccessUrl
(
"/"
,
true
).
permitAll
().
failureUrl
(
"/signin?#/error"
).
and
()
http
.
formLogin
().
loginPage
(
"/signin"
).
defaultSuccessUrl
(
"/"
,
true
).
permitAll
().
failureUrl
(
"/signin?#/error"
).
and
()
.
httpBasic
();
.
httpBasic
();
...
@@ -403,7 +403,7 @@ public class AuthConfiguration {
...
@@ -403,7 +403,7 @@ public class AuthConfiguration {
http
.
csrf
().
disable
();
http
.
csrf
().
disable
();
http
.
headers
().
frameOptions
().
sameOrigin
();
http
.
headers
().
frameOptions
().
sameOrigin
();
http
.
authorizeRequests
()
http
.
authorizeRequests
()
.
antMatchers
(
"/prometheus/**"
,
"/metrics/**"
,
"/openapi/**"
,
"/vendor/**"
,
"/styles/**"
,
"/scripts/**"
,
"/views/**"
,
"/img/**"
,
"/i18n/**"
,
"/prefix
P
ath"
).
permitAll
()
.
antMatchers
(
"/prometheus/**"
,
"/metrics/**"
,
"/openapi/**"
,
"/vendor/**"
,
"/styles/**"
,
"/scripts/**"
,
"/views/**"
,
"/img/**"
,
"/i18n/**"
,
"/prefix
-p
ath"
).
permitAll
()
.
antMatchers
(
"/**"
).
authenticated
();
.
antMatchers
(
"/**"
).
authenticated
();
http
.
formLogin
().
loginPage
(
"/signin"
).
defaultSuccessUrl
(
"/"
,
true
).
permitAll
().
failureUrl
(
"/signin?#/error"
).
and
()
http
.
formLogin
().
loginPage
(
"/signin"
).
defaultSuccessUrl
(
"/"
,
true
).
permitAll
().
failureUrl
(
"/signin?#/error"
).
and
()
.
httpBasic
();
.
httpBasic
();
...
...
apollo-portal/src/main/resources/static/login.html
View file @
5c5deb7e
...
@@ -307,7 +307,7 @@
...
@@ -307,7 +307,7 @@
e
.
preventDefault
();
e
.
preventDefault
();
});
});
$
.
get
(
"
prefix
P
ath
"
,
function
(
result
){
$
.
get
(
"
prefix
-p
ath
"
,
function
(
result
){
window
.
localStorage
.
setItem
(
"
prefixPath
"
,
result
);
window
.
localStorage
.
setItem
(
"
prefixPath
"
,
result
);
});
});
...
...
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