mirror of
https://github.com/apache/rocketmq-dashboard.git
synced 2025-09-12 04:40:32 +08:00
@@ -48,7 +48,18 @@ public class AuthWebMVCConfigurerAdapter extends WebMvcConfigurerAdapter {
|
|||||||
@Override
|
@Override
|
||||||
public void addInterceptors(InterceptorRegistry registry) {
|
public void addInterceptors(InterceptorRegistry registry) {
|
||||||
if (configure.isLoginRequired()) {
|
if (configure.isLoginRequired()) {
|
||||||
registry.addInterceptor(authInterceptor).excludePathPatterns("/error", "/user/guide/**", "/login/**");
|
registry.addInterceptor(authInterceptor).addPathPatterns(
|
||||||
|
"/cluster/**",
|
||||||
|
"/consumer/**",
|
||||||
|
"/dashboard/**",
|
||||||
|
"/message/**",
|
||||||
|
"/messageTrace/**",
|
||||||
|
"/monitor/**",
|
||||||
|
"/rocketmq/**",
|
||||||
|
"/ops/**",
|
||||||
|
"/producer/**",
|
||||||
|
"/test/**",
|
||||||
|
"/topic/**");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -62,6 +62,7 @@ public class LoginServiceImpl implements LoginService {
|
|||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
logger.error("url encode:{}", url, e);
|
logger.error("url encode:{}", url, e);
|
||||||
}
|
}
|
||||||
|
logger.debug("redirect url : {}", url);
|
||||||
WebUtil.redirect(response, request, "/#/login?redirect=" + url);
|
WebUtil.redirect(response, request, "/#/login?redirect=" + url);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error("redirect err", e);
|
logger.error("redirect err", e);
|
||||||
|
@@ -12,6 +12,7 @@ spring.application.name=rocketmq-console
|
|||||||
spring.http.encoding.charset=UTF-8
|
spring.http.encoding.charset=UTF-8
|
||||||
spring.http.encoding.enabled=true
|
spring.http.encoding.enabled=true
|
||||||
spring.http.encoding.force=true
|
spring.http.encoding.force=true
|
||||||
|
logging.level.root=INFO
|
||||||
logging.config=classpath:logback.xml
|
logging.config=classpath:logback.xml
|
||||||
#if this value is empty,use env value rocketmq.config.namesrvAddr NAMESRV_ADDR | now, you can set it in ops page.default localhost:9876
|
#if this value is empty,use env value rocketmq.config.namesrvAddr NAMESRV_ADDR | now, you can set it in ops page.default localhost:9876
|
||||||
rocketmq.config.namesrvAddr=
|
rocketmq.config.namesrvAddr=
|
||||||
|
Reference in New Issue
Block a user