diff --git a/naming/src/main/java/com/alibaba/nacos/naming/web/DistroFilter.java b/naming/src/main/java/com/alibaba/nacos/naming/web/DistroFilter.java index 15baec29d..20ff10f9b 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/web/DistroFilter.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/web/DistroFilter.java @@ -80,6 +80,9 @@ public class DistroFilter implements Filter { if (StringUtils.isBlank(serviceName)) { serviceName = req.getParameter("dom"); } + if (StringUtils.isNotBlank(serviceName)) { + serviceName = serviceName.trim(); + } Method method = filterBase.getMethod(req.getMethod(), path); if (method == null) {