1
0
mirror of https://github.com/chatopera/cosin.git synced 2025-08-01 16:38:02 +08:00

Closed #95 不认证情况下访问health和metrics

This commit is contained in:
Hai Liang Wang 2018-09-30 10:48:43 +08:00
parent 43a0158bef
commit 73d18ce2cd

View File

@ -57,14 +57,18 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
RequestMatcher beans = new AntPathRequestMatcher("/beans/**");
RequestMatcher dump = new AntPathRequestMatcher("/dump/**");
RequestMatcher env = new AntPathRequestMatcher("/env/**");
RequestMatcher health = new AntPathRequestMatcher("/health/**");
RequestMatcher info = new AntPathRequestMatcher("/info/**");
RequestMatcher mappings = new AntPathRequestMatcher("/mappings/**");
RequestMatcher metrics = new AntPathRequestMatcher("/metrics/**");
RequestMatcher trace = new AntPathRequestMatcher("/trace/**");
RequestMatcher druid = new AntPathRequestMatcher("/druid/**");
return new DelegateRequestMatchingFilter(autconfig , configprops , beans , dump , env , health , info , mappings , metrics , trace, druid);
/**
* Bypass actuator api
*/
// RequestMatcher health = new AntPathRequestMatcher("/health/**");
// RequestMatcher metrics = new AntPathRequestMatcher("/metrics/**");
// return new DelegateRequestMatchingFilter(autconfig , configprops , beans , dump , env , health , info , mappings , metrics , trace, druid);
return new DelegateRequestMatchingFilter(autconfig , configprops , beans , dump , env , mappings , trace, druid);
}
@Bean