Skip to content

Commit

Permalink
Sync headers
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbumenJ committed Nov 28, 2023
1 parent e2899ab commit 76bf38d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions clients/naming_client/naming_proxy_delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package naming_client

import (
"context"
"github.com/nacos-group/nacos-sdk-go/v2/inner/uuid"

"github.com/nacos-group/nacos-sdk-go/v2/clients/naming_client/naming_cache"
"github.com/nacos-group/nacos-sdk-go/v2/clients/naming_client/naming_grpc"
Expand All @@ -40,7 +41,14 @@ type NamingProxyDelegate struct {
func NewNamingProxyDelegate(ctx context.Context, clientCfg constant.ClientConfig, serverCfgs []constant.ServerConfig,
httpAgent http_agent.IHttpAgent, serviceInfoHolder *naming_cache.ServiceInfoHolder) (naming_proxy.INamingProxy, error) {

uid, err := uuid.NewV4()
if err != nil {
return nil, err
}
namingHeader := map[string][]string{
"Client-Version": {constant.CLIENT_VERSION},
"User-Agent": {constant.CLIENT_VERSION},
"RequestId": {uid.String()},
"Request-Module": {"Naming"},
}
nacosServer, err := nacos_server.NewNacosServer(ctx, serverCfgs, clientCfg, httpAgent, clientCfg.TimeoutMs, clientCfg.Endpoint, namingHeader)
Expand Down

0 comments on commit 76bf38d

Please sign in to comment.