Commit 5c5deb7e authored by Jason Song's avatar Jason Song Committed by kezhenxu94

normalize url for prefix path (#2807)

parent c102e2b9
...@@ -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("/prefixPath") @GetMapping("/prefix-path")
public String getPrefixPath(){ public String getPrefixPath(){
return prefixPath; return prefixPath;
} }
......
...@@ -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/**", "/prefixPath").permitAll() .antMatchers("/prometheus/**","/metrics/**","/openapi/**", "/vendor/**", "/styles/**", "/scripts/**", "/views/**", "/img/**", "/i18n/**", "/prefix-path").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/**", "/prefixPath").permitAll() .antMatchers("/prometheus/**","/metrics/**","/openapi/**", "/vendor/**", "/styles/**", "/scripts/**", "/views/**", "/img/**", "/i18n/**", "/prefix-path").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();
......
...@@ -307,7 +307,7 @@ ...@@ -307,7 +307,7 @@
e.preventDefault(); e.preventDefault();
}); });
$.get("prefixPath", function(result){ $.get("prefix-path", function(result){
window.localStorage.setItem("prefixPath",result); window.localStorage.setItem("prefixPath",result);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment