白名单验证添加服务就绪检测、prometheus检测
This commit is contained in:
@ -102,7 +102,9 @@ public class TokenAuthenticationFilter extends OncePerRequestFilter {
|
|||||||
*/
|
*/
|
||||||
private boolean checkWhiteList(String method, String methodType) {
|
private boolean checkWhiteList(String method, String methodType) {
|
||||||
return Optional.ofNullable(allows.getApis()).orElseGet(ArrayList::new)
|
return Optional.ofNullable(allows.getApis()).orElseGet(ArrayList::new)
|
||||||
.parallelStream().anyMatch(reg -> Pattern.compile(reg).matcher(methodType + "." + method).matches());
|
.parallelStream().anyMatch(reg -> Pattern.compile(reg).matcher(methodType + "." + method).matches())
|
||||||
|
|| method.contains("actuator/health") //服务的就绪检测
|
||||||
|
|| method.contains("actuator/prometheus"); //prometheus检测
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user