Compare commits

...

4 Commits

Author SHA1 Message Date
hjk2008 0b2b49daee
Pre Merge pull request !295 from hjk2008/N/A 2025-03-10 03:45:46 +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
hjk2008 477b7472be
代码优化,更新 FeignRequestInterceptor 对 null 的检测,直接使用 `!= null` 代替 `StringUtils.isNotNull`,以免产生歧义
Signed-off-by: hjk2008 <hjk2008ext@163.com>
2022-12-04 08:35:52 +00:00
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -22,7 +22,7 @@ public class FeignRequestInterceptor implements RequestInterceptor
public void apply(RequestTemplate requestTemplate)
{
HttpServletRequest httpServletRequest = ServletUtils.getRequest();
if (StringUtils.isNotNull(httpServletRequest))
if (httpServletRequest != null)
{
Map<String, String> headers = ServletUtils.getHeaders(httpServletRequest);
// 传递用户信息请求头,防止丢失