4 Commits

Author SHA1 Message Date
twelvet
436281728d Pre Merge pull request !192 from twelvet/N/A 2025-03-10 03:45:39 +00:00
若依
a6bcebb62b !397 修复actuator暴漏问题
Merge pull request !397 from 威士忌的纯度/N/A
2025-03-10 03:45:34 +00:00
威士忌的纯度
1cb262daa3 修复actuator暴漏问题
Signed-off-by: 威士忌的纯度 <whr888888@vip.qq.com>
2025-03-07 10:22:52 +00:00
TwelveT
4ae09f3793 适配路径是否存在 斜杆结尾 2022-05-19 08:56:35 +00:00
2 changed files with 6 additions and 1 deletions

View File

@@ -29,7 +29,7 @@ http {
}
# 避免actuator暴露
if ($request_uri ~ "/actuator") {
if ($uri ~ "/actuator") {
return 403;
}

View File

@@ -46,6 +46,11 @@ public class AuthFilter implements GlobalFilter, Ordered
ServerHttpRequest.Builder mutate = request.mutate();
String url = request.getURI().getPath();
if (url.endsWith("/")) {
url = url.substring(0, url.length() - 1);
}
// 跳过不需要验证的路径
if (StringUtils.matches(url, ignoreWhite.getWhites()))
{