diff --git a/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java b/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java index eb7fa8e07..c5e02862b 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java @@ -1047,11 +1047,7 @@ public class ClientWorker implements Closeable { } catch (Exception e) { throw new NacosException(NacosException.CLIENT_INVALID_PARAM, e); } - - Map signHeaders = SpasAdapter.getSignHeaders(resourceBuild(request), secretKey); - if (signHeaders != null && !signHeaders.isEmpty()) { - request.putAllHeader(signHeaders); - } + request.putAllHeader(SpasAdapter.getSignHeaders(resourceBuild(request), secretKey)); JsonObject asJsonObjectTemp = new Gson().toJsonTree(request).getAsJsonObject(); asJsonObjectTemp.remove("headers"); asJsonObjectTemp.remove("requestId");