Skip to content

Commit

Permalink
close tikv#4490: fix transport and change component key
Browse files Browse the repository at this point in the history
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
  • Loading branch information
CabinfeverB committed Dec 28, 2021
1 parent 5511ebc commit 746df30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/apiutil/apiutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
var (
// ComponentSignatureKey is used for http request header key
// to identify component signature
ComponentSignatureKey = "ti-component"
ComponentSignatureKey = "component"
// ComponentAnonymousValue identify anonymous request source
ComponentAnonymousValue = "anonymous"
)
Expand Down
7 changes: 6 additions & 1 deletion tools/pd-ctl/pdctl/command/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ import (
)

var (
dialClient = &http.Client{}
dialClient = &http.Client{
Transport: &apiutil.UserSignatureRoundTripper{
Component: "pdctl",
Proxied: http.DefaultTransport,
},
}
pingPrefix = "pd/api/v1/ping"
)

Expand Down

0 comments on commit 746df30

Please sign in to comment.